Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

finding all occurances of text

Status
Not open for further replies.

zaphy2k2

Programmer
Dec 23, 2001
30
GB
hi,

I need to find all text, and highlight it. Find&Replace would be good, but i cant highlight from that(?).

If i do :

With doc.Content
.GoTo what:=wdGoToPage, which:=wdGoToFirst
.Collapse wdCollapseStart
With .Find
.MatchWholeWord = matchWholeWd
.MatchCase = False
Do
.Execute findtext:=aFind, Forward:=True
' I CAN'T GET THE RANGE HERE
Loop While .Found
End With
End With

, and if i use doc.selection after selecting it all, i get the range, but then lose the place in the document ...

can anyone help with this?

cheers,
aaron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top