There is a certain doc file in which the document template is stored (must be filled out from the form). But when a program tries to write something into this doc, then it goes into read-only mode and therefore the program cannot change anything in it.
Open method (goes great):
doc = app.Documents.Open(ref fileName, ref missing, ref trueValue, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing); The Execute method (in it I’m looking for the word to replace findText and change to replaceWith . And here it gives me an error - "this command is not available")
app.Selection.Find.Execute(ref findText, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref replaceWith, ref replace, ref missing, ref missing, ref missing, ref missing);