Q
QK
The code behind is pretty much standard (I just copy and paste).
Something very strange, the number of occurence for this search string is
correct.
But the insertion point (in my case the cursor) seems to be "frozen" at the
top of
the document!
Dim intFound As Integer
Dim ORng As Word.Range
Set ORng = Oword.ActiveDocument.Range
intFound = 0
With ORng.Find
.ClearFormatting
.Forward = True
.Text = "09 March 2006"
.Execute
Do While .Found = True
nStartPg = Oword.Selection.Information(wdActiveEndPageNumber)
intFound = intFound + 1
MsgBox "Found on page " & nStartPg & " " & intFound & " times",
vbOKOnly, "TEST"
.Execute
Loop
End With
MsgBox "'09 March 2006' Found " & intFound & " times", vbOKOnly, "TEST"
What's wrong with the insertion point, or with my code?!
Very desperate for this.
Something very strange, the number of occurence for this search string is
correct.
But the insertion point (in my case the cursor) seems to be "frozen" at the
top of
the document!
Dim intFound As Integer
Dim ORng As Word.Range
Set ORng = Oword.ActiveDocument.Range
intFound = 0
With ORng.Find
.ClearFormatting
.Forward = True
.Text = "09 March 2006"
.Execute
Do While .Found = True
nStartPg = Oword.Selection.Information(wdActiveEndPageNumber)
intFound = intFound + 1
MsgBox "Found on page " & nStartPg & " " & intFound & " times",
vbOKOnly, "TEST"
.Execute
Loop
End With
MsgBox "'09 March 2006' Found " & intFound & " times", vbOKOnly, "TEST"
What's wrong with the insertion point, or with my code?!
Very desperate for this.