Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft Word: How to force a hard page 1

Status
Not open for further replies.

judgehopkins

Technical User
Mar 23, 2003
780
US
For lots of various reasons, some publishers are requiring manuscripts in Microsoft Word format with a hard page at the bottom of each page.

Is there a way to force Word to insert a hard page at the bottom of each page automatically?

Thanks.

There are two guaranteed rules of success: First, never tell everything you know.
 
How about when you are done, search for soft page and replace with hard page.
 
wr, you gave me an idea.

I made a footer with symbols in it (*** would do). I then did a search and replace (with manual page break).

It appears to have worked.

Thanks for the thought starter.

There are two guaranteed rules of success: First, never tell everything you know.
 
Fascinating! Although it is _possible_ to put a hard page break in a page footer, Word is sensible enough not to honour it.

The answer to the original question is, really: no, there is no way to make this happen automatically, although some VBA code could be written to take a shot at it. There is no guarantee, however, that the process would not lead to blank pages when the document was opened on another computer.



Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

I'm working (slowly) on my own website
 
Hi judgehopkins,

If your publisher really requires that, it sounds like they expect you to use a page layout program (eg Pagemaker) rather than a Word processor. IOW, they want you to do something that would only be expected if the author was taking responsibility for the final layout. If that's what they want, I suggest sending them a PDF - that'll preserve your layout right down to the absolute positioning of every character on the page.


Cheers
[MS MVP - Word]
 
They require Word.

There are two guaranteed rules of success: First, never tell everything you know.
 
Hi judgehopkins,

Requiring hard page breaks in a Word document creates all sorts of problems, including:
. paragraph breaks in the middle of existing paragraphs - messes up justification &(potentially) the leading space at the top of the next page, and plays havoc with auto numbering;
. necessitates artificially short page lengths - to avoid blank pages when the document is opened on a system using a different printer driver (ie your publisher's system); and
. makes editing the document far more complicated than it needs to be - potentially, all the hard page breaks after a single edit will have to be relocated.

I suggest querying the publisher as to the necessity and reasons for this peculiar requirement and, if they haven't got a good reason, finding another publisher.


Cheers
[MS MVP - Word]
 
I agree with all the advice given here. But then, I had to find out if it can be done.

Microsoft Article 201953 explains how to do it. I tried it on a few documents and it worked well.

Canadian eh! Check out the new social forum Tek-Tips in Canada.
With the state of the world today, monkeys should get grossly insulted when humans claim to be their decendents
 
Hi xlhelp,

Thanks for the link. Interesting macro, but it doesn't handle tables all that well, especially if it's got cells spanning merged rows or more than one page.

FWIW, I've simplified the macro a bit:
Code:
Sub ReplaceSoftPageBreaks()
Dim iPgNum As Integer, RngStart As Range
' Save current location for return.
Set RngStart = Selection.Range
' Repaginate the document.
ActiveDocument.Repaginate
' Loop through the number of pages in the document.
For iPgNum = 2 To ActiveDocument.Range.Information(wdNumberOfPagesInDocument)
  With Selection
    ' Go to next page in iteration.
    .GoTo What:=wdGoToPage, Which:=wdGoToAbsolute, Count:=iPgNum
    ' Move insertion point left one character.
    .MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdMove
    ' Check the character code at insertion point for hard page break or text.
    If Asc(.Text) <> 12 And Asc(.Text) <> 14 Or Asc(.Text) > 31 Then
      ' Check to see if the insertion point is in a table.
      If .Information(wdWithInTable) Then
        ' Move insertion point out of table.
        .MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdMove
      End If
      .InsertBreak Type:=wdPageBreak
    End If
  End With
Next
RngStart.Select
Set RngStart = Nothing
End Sub


Cheers
[MS MVP - Word]
 
Goodness! Not handle tables well? The code doesn't even work well in the simple case of a page breaking in the middle of a paragraph.

This is extremely hard to automate and impossible to get totally right in the general case, although it might work in some specialised situations.

macropod is right. If pages are important, use a page layout application.



Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

I'm working (slowly) on my own website
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top