Manual Page Break Macro

G

Guest

Hi All,

I receive a weekly Txt document sometimes over 100 pages. Each section
begins with i.e. "Page (1)" and ends with "Continued on next page"

How can I write a macro loop that will insert page break after text
"Continued on next page" and will not have any blank pages.

I am new to VB and appreciate your help.
 
J

Jay Freedman

You don't need a macro.

In your global template (Normal.dot), define a new paragraph style.
I'll suggest the name PageTop but you can use any name that isn't
already in use. In the New Style dialog, click the Format button and
choose Paragraph. In the Paragraph dialog, click the Line & Page
Breaks tab, and check the box for "Page break before". Define any
other font or paragraph formatting you want, and close all the
dialogs.

In your weekly document, open the Replace dialog and click the More
button. In the Find What box, enter

Page (

(I'll assume that this occurs only in the line that starts each page,
and not elsewhere in the document.)

With the cursor in the Replace With box, click the Special button and
choose "Find What Text" from the list. This enters the code ^& in the
box. Now click the Format button, click Style, and choose your PageTop
style.

When you click the Replace All button, the PageTop style will be
applied to each occurrence of the paragraph containing "Page (" and
that will cause it to appear on a new page.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
S

Suzanne S. Barnhill

Good thinking, Jay!

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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