Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Page Breaks

1 view
Skip to first unread message

S@discussions.microsoft.com Paula S

unread,
Dec 29, 2009, 1:40:01 PM12/29/09
to
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!!!

Doug Robbins - Word MVP

unread,
Dec 29, 2009, 5:56:48 PM12/29/09
to
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

"Paula S" <Paula S...@discussions.microsoft.com> wrote in message
news:9670022B-CE6E-47D8...@microsoft.com...

0 new messages