Page Breaks

P

Paula S

I want to set up the body of a novel for auto page breaks after 250 words are
typed. Is this possible? I am tired of having to go to word count and
manually enter a page break. Also, I want to avoid corrections to this during
editing!!!

HELP!!!
 
D

Doug Robbins - Word MVP

You cannot do that.

However, if you just type text and then run a macro containing the
following code, it will insert a page break before each 251st Word

Dim myrange As Range
Selection.HomeKey wdStory
With Selection.Find
.ClearFormatting
.Execute FindText:="^b", Replace:=wdReplaceAll, ReplaceWith:="",
Forward:=True, MatchWildcards:=False
End With
Selection.HomeKey wdStory
Start:
Set myrange = Selection.Range
myrange.End = ActiveDocument.Range.End
If myrange.Words.Count > 250 Then
myrange.Words(251).Select
Selection.Collapse wdCollapseStart
Selection.InsertBreak
GoTo Start
Else
Exit Sub
End If

Running it again will remove all of the page breaks and re-insert them again
in new positions if the text has changed.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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