Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2006

Tip: Looking for answers? Try searching our database.

while not "\EndOfDoc"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ME - 12 Oct 2006 20:58 GMT
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
Doug Robbins - Word MVP - 12 Oct 2006 21:09 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.