I am using the routine below to find the position of a keyword inside a document.
The problem is that the code will also select the matching text, and reposition the page so that this will be displayed at the top of the Word application.
How can I get the position of the keyword in a seamless way, without having it selected and the page repositioned, please?
Code:
With Selection.Find
.ClearFormatting
.Text = "keyword"
.Font.Size = 10
.Font.Name = Verdana
.Forward = True
.Wrap = wdFindStop
.Execute
If .Found = True Then
Position = Selection.Start
End If
End With
MsgBox (Position)
Alex