Microsoft Word Object Library
Posted on 2002-05-31
I am issuing a find/replace command and it is only replacing certain instances that are plain text in the document, but not instances of the word that are contained inside of a text box.
When using the fing/replace within word it works fine.
Dim wordApp As Word.Application
Dim wordDoc As Word.Document
Set wordApp = New Word.Application
Set wordDoc = wordApp.Documents.Open("Test.doc", ReadOnly:=False)
wordApp.Selection.Find.Execute "this", False, False, False, False, False, True, wdFindContinue, False, "that", wdReplaceAll
what is the scope of the wordApp.Selection without specifying it like i'm not?
Is there something i can do to make sure it looks everywhere in the document?