Only Delete on current page

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.
 
S

Suzanne S. Barnhill

You can select the text on that page and use Find and Replace to replace
that specific text with nothing in the selection.
 
S

Steved

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.
 
C

Cindy M.

Hi =?Utf-8?B?U3RldmVk?=,
Please I would like a macro to delete the below only from the current page.
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 :)
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
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)
http://www.word.mvps.org

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

Steved

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top