Find/Replace or VBA to remove character ?

D

davidku

Hi,

In my MS Word document, there are about 300 pages.
I need to remove the last line of each page if it is a number.

Any way to achieve it without writing a macro or I need a macro.
Thanks for suggestion.

Here's how the content looks like

page 1
some content here. content here. some content here. content here
some content here. content here
some content here. content here
some content here. content here
some content here. content here
some content here. content here

1

page 2
some content here. content here. some content here. content here
some content here. content here
some content here. content here
some content here. content here
some content here. content here
some content here. content here
 
P

Peter T. Daniels

Probably your document has both Headers and Footers. Place your cursor
down below the main text, somewhere near where the page number you
don't want is, and double-click.

This will change the focus of Word to the Footer, which will now be
black instead of grayed-out. You can then simply delete the page
number (no matter what page you happen to be on when you do it.)

To go back to your text, double-click anywhere in the text.

The page breaks / distribution of lines will not change. If you want
to put another line or two on the page (in the space freed up by
removing the extra page number), then you need to go into the Page
Setup display and change the Margin for the Footer. (You can't
actually make the Footer go away after it's been used in a document,
but you can reduce it to nothing. When you delete the page number,
also delete the paragraph mark in the Footer.)
 
S

Suzanne S. Barnhill

What this sounds to me like is a text document in which page numbers have
been inserted manually as part of the document text. Assuming that the "page
number" is in a separate paragraph, these could be removed with three
Replace passes (it could probably be done in one with wildcards, but I
usually find it faster to do multiple passes than to figure out the correct
wildcard syntax).

First pass: Replace ^p^#^#^#^p with ^p
Second pass: Replace ^p^#^#^p with ^p
Third pass: Replace ^p^#^p with ^p

The first pass will remove all the three-digit numbers and the paragraph
they're in. The second and third passes take care of the two-digit and then
one-digit numbers.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

Probably your document has both Headers and Footers. Place your cursor
down below the main text, somewhere near where the page number you
don't want is, and double-click.

This will change the focus of Word to the Footer, which will now be
black instead of grayed-out. You can then simply delete the page
number (no matter what page you happen to be on when you do it.)

To go back to your text, double-click anywhere in the text.

The page breaks / distribution of lines will not change. If you want
to put another line or two on the page (in the space freed up by
removing the extra page number), then you need to go into the Page
Setup display and change the Margin for the Footer. (You can't
actually make the Footer go away after it's been used in a document,
but you can reduce it to nothing. When you delete the page number,
also delete the paragraph mark in the Footer.)
 

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