I need to carry out some editing on the text of a document.
A macro will do well.
How can I repeat it until the end of the document?
I tried something like WHILE NOT "\EndOfDoc" but it did not work.
Any suggestions?
Thank you in advance
Carlos
You need to tell us exactly what you want to do.
You would normally do it with something like:
Dim DRange As Range
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="[A-Z]{2,}", MatchWildcards:=True,
Wrap:=wdFindContinue, Forward:=True) = True
Set DRange = Selection.Range
DRange.Case = wdTitleWord
Loop
End With
But, it depends what "it" is.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
>I need to carry out some editing on the text of a document.
> A macro will do well.
[quoted text clipped - 5 lines]
> Thank you in advance
> Carlos
ME - 12 Oct 2006 21:19 GMT
> You would normally do it with something like:
...
Thank you for that code. It does help my case and I can forget the
"\EndOfDoc" bookmark.
But I would be interested in seeing an example (any code) using that
bookmark.
Thank you again
Carlos
Jezebel - 13 Oct 2006 02:26 GMT
> But I would be interested in seeing an example (any code) using that
> bookmark.
Debug.print activedocument.Bookmarks("\endofdoc").start