I need to remove extra blank lines from the word document. I tried using the following code line: doc.Range.Replace("\r\f", "\f", true, true) without any success.
The process I am working adds a header section to the document which causes the parts of the section content to spill into a new blank page. However in most cases there isn't much content in the section, but instead there are many line breaks. Ideally, I would like to remove all blank likes (line breaks) at the end of each section.
Can you advise how to do this? Thanks in advace.