This project has moved and is read-only. For the latest updates, please go here.

How to globally change font, and remove/add line breaks?

Dec 31, 2013 at 4:28 PM
Is there an example on how I can change the font globally, remove superfluous spaces, and remove or add extra line breaks?

I want to convert a document to use a different font. Is there an example on how to do that?

I find, too, that often there are extraneous spaces in documents, and I want to iterate over all these until there are never two contiguous spaces. I can do this in a loop, I guess, replacing " " (2 spaces) with " " (1 space) until " " (2 spaces) is no longer found.

I also want to remove superfluous line breaks that sometimes occur when copying-and-pasting text into a document. I can do it "manually" (in Libre Office, not sure how it's done in MS Word), as I got an answer to this question:
(select "Regular Expressions" and then replace "$" (without the quotes) with a space)

Additionally, in some cases I want to ADD line breaks/"paragraph returns" where there are legitimate line breaks between the end of one paragraph and the start of another, but no extra line to separate them visually. According to this:

...I can add a paragraph/line break to a legitimate line break by searching for "$" and replacing that with "\n\n"

This does work, too (manually, in Libre Office). to do this with the DocX library?