Only Delete on current page

  • Thread starter Thread starter Steved
  • Start date Start date
S

Steved

Hello from Steved

Please I would like a macro to delete the below only from the current page.

For example I might have a 18 page document and lets say page 12 is where I
want to delete the below but leave all other pages alone.

R 37:1:10
R 12:5:4
R 9:12:9

Thankyou.
 
You can select the text on that page and use Find and Replace to replace
that specific text with nothing in the selection.
 
Hello Suzanne from Steved

I do this now but having sometime to do up to 10 pages I thought their has
to be a better way.

Thanks for your reply.
 
Hello from Steved
Thankyou

Cindy M. said:
Hi =?Utf-8?B?U3RldmVk?=,

The better place to get help with macros is the "Word Programming"
(word.vba.general) newsgroup. As you've seen, this group deals mainly with
end-user questions :-)

A macro for the task could look like this:

Sub FindReplaceOnePage
Dim rng as Word.range

Set rng = ActiveDocument.Bookmarks("\Page").Range
With rng.Find
'Find commands here
End With
End Sub

For the find commands, record a macro when performing the searches, then
incorporate that code into the framework I've given you. Note that you'll
probably get some duplication and extraneous commands that you can delete.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)


This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
 
Back
Top