I need to find a string in an word document with multiple occurences. When found, it must be selected and some things are done with the selection (no replacement)
This Code works fine:
Dim myrange As Word.Range
myrange = myDoc.Content
myrange.Find.Text = l_strShortFile 'the string to be found
If myrange.Find.Execute Then
' here I use the selection (the found string), to insert bookmarks and so on ...
with the FIRST occurrence of the string. All other occurrences are ignored.
I made many tries with 'WdFindWrap.wdFindContinue' and Dos and Loops and While ...
but couldn't get it to work.
Can you please help me?