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 / November 2004

Tip: Looking for answers? Try searching our database.

Find "Previous" or "Backwards"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fred Holmes - 10 Nov 2004 16:02 GMT
Word 2003.  Windows XP

The Word find dialog only has "Find Next".  There doesn't seem to be
any way to "Find Prvious" or whatever command to search/find backwards
through the document.

Is there any way to do this with some VBA code?  It should be hooked
to the current Find process.  I.E. One Keyboard shortcut would "find
next" and another would "find previous."

I'm looking for a way to go directly back to the prior hit, or second
prior hit, but then proceed forward again.  A locked loop to go
through the entired document in the bacwards direction only isn't
really helpful.

Thanks for any help.

Fred Holmes
Dave Lett - 10 Nov 2004 16:44 GMT
Hi Fred,

Well, there is a "previous".

With Selection.Find
   .Text = "Test"
   .Forward = False
   .Execute
End With

If, however, you've already run your first find operation, you can use

Application.Browser.Next
and
Application.Browser.Previous

HTH,
Dave

Selection.Browser.Next
> Word 2003.  Windows XP
>
[quoted text clipped - 14 lines]
>
> Fred Holmes
 
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.