I use the ReplaceAll command to replace placeholders in my document, which usually works fine. However, if I insert a paragraph to the document, all placeholders that are further down in the document, than the new paragraph do not get replaced anymore. Is there a way to circumvent that?
Here is the example:
Code: Select all
DOCX.Editor.FindReplace.BeginReplaceUI(Placeholder,NewText);
DOCX.Editor.FindReplace.ReplaceAll;
DOCX.Editor.FindReplace.EndFind;
Code: Select all
DOCX.Editor.Paras.Insert(10);
How can I add paragraphs while also replacing all placeholders?