A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Formatting Long Documents
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Find/Replace problem



 
 
Thread Tools Display Modes
  #1  
Old October 1st, 2004, 03:56 PM
Andrea
external usenet poster
 
Posts: n/a
Default Find/Replace problem

I've got a long document that i use the find/replace to
find names in. after i find the name i close find, delete
the page, then control-f to open the find window again and
move onto the next name. (i use keyboard shortcuts and
page-delete macro to do all this) after doing this a few
times the note 'search down' appears. i know how to turn
it off but i want to know *why* it keeps changing on me
automatically. Can anyone help?
  #2  
Old October 2nd, 2004, 01:08 PM
Doug Robbins
external usenet poster
 
Posts: n/a
Default

If it is the same name that you are looking for each time and you want to
delete all of the pages on which that name appears, the following macro will
ask you for the name and then do it all for you:

Dim findname As String, namepage As Range
findname = InputBox("Enter the Name that you are looking for.", "Page
Deleter")
Selection.HomeKey wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:=findname, Wrap:=wdFindContinue,
Forward:=True) = True
Set namepage = Selection.Range.Bookmarks("\page").Range
namepage.Delete
Loop
End With


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Andrea" wrote in message
...
I've got a long document that i use the find/replace to
find names in. after i find the name i close find, delete
the page, then control-f to open the find window again and
move onto the next name. (i use keyboard shortcuts and
page-delete macro to do all this) after doing this a few
times the note 'search down' appears. i know how to turn
it off but i want to know *why* it keeps changing on me
automatically. Can anyone help?



  #3  
Old October 6th, 2004, 05:45 AM
Klaus Linke
external usenet poster
 
Posts: n/a
Default

Andrea,

And for "why": Word changes from searching "all" to "down" if you have
something selected before you start the search.

In that case, Word initially only searches the selection. When it has
finished, it'll ask you whether it should search the rest of the document.

BTW, nice keyboard shortcuts to find the next/previous occurrence without
opening the dialog again are Ctrl+PageDown ( = BrowseNext) and Ctrl+PageUp
(= BrowsePrevious).
The blue double arrows below the vertical scoll bar (to the right of the
document) serve the same purpose if you prefer the mouse.

Regards,
Klaus


"Andrea" wrote:
I've got a long document that i use the find/replace to
find names in. after i find the name i close find, delete
the page, then control-f to open the find window again and
move onto the next name. (i use keyboard shortcuts and
page-delete macro to do all this) after doing this a few
times the note 'search down' appears. i know how to
turn it off but i want to know *why* it keeps changing
on me automatically. Can anyone help?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Instances problem Jordan Using Forms 1 July 19th, 2004 03:21 PM
find/replace many links problem pleblanc General Discussion 1 July 14th, 2004 09:43 PM
Big Problem. We need the fix Captain K Calendar 0 July 8th, 2004 04:50 PM
Passport Logout Problem Chen qiang New Users 0 May 4th, 2004 09:26 AM
Help Microsoft? WORD11.ADM File Problem Line 818? Dwight Hutchinson New Users 2 May 3rd, 2004 08:25 PM


All times are GMT +1. The time now is 04:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.