E
Ed
I just want to share the solution I came up with to my problem. I was using
a Find to locate a string of text, then trying to loop through a series of
actions (one of which was add a page break) once the text string was found.
I started my loop with:
Do While .Execute(FindText:="ITEM ID") = True
The loop, though, found the first instance of the text and sat there,
performing actions and adding pages. Looking at it, I decided it was
finding the text, making FindText = True, but never re-running the Find,
since the Find was outside the loop. I changed to this:
Do
Selection.Find.Execute
If Selection.Find.Found = True Then
' do stuff
which put my Execute as part of the loop, *then* tested for True. It now
works okay.
Thanks to all for the help you gave that led me here.
Ed
a Find to locate a string of text, then trying to loop through a series of
actions (one of which was add a page break) once the text string was found.
I started my loop with:
Do While .Execute(FindText:="ITEM ID") = True
The loop, though, found the first instance of the text and sat there,
performing actions and adding pages. Looking at it, I decided it was
finding the text, making FindText = True, but never re-running the Find,
since the Find was outside the loop. I changed to this:
Do
Selection.Find.Execute
If Selection.Find.Found = True Then
' do stuff
which put my Execute as part of the loop, *then* tested for True. It now
works okay.
Thanks to all for the help you gave that led me here.
Ed