How to delete spaces in the document

I want to delete spaces in the document , what to do?I used this method very very slowly

doc.Sections[0].Body.Range.Replace(new Regex(@"([\u0020])"), "");

I have solved,put in paragraph

Hi,


It is nice to hear from you that you have solved your problem. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.