Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post

    Section Page Numbering and Section Breaks (Word 20

    Hi All,

    I'm having fun with section breaks and page numbering. Basically I have a document with various sections. Each section begins with a heading 1 style, which adds a page-break before it. It is a double-sided document and has different odd and even headers/footers. Each section's page numbering starts with 1. In normal view the problem area looks like:

    <text>
    ============ Section Break (Next Page)===============
    2. TECHNICAL SOLUTION (heading 1, page break before)

    When i switch to Print Preview I see a blank page with no header/footer inserted before the new section. I don't want this blank page there!
    I thought i'd remove the Page Break Before from the Heading 1 style, but this seems to make no difference. The blank page is still there.

    The only way to get rid of the blank page is to format the header/footer page numbering to continue from the previous section, rather than starting from 1. I don't want to do this.

    I've tried continuous section breaks, next page section breaks, but all to no avail - i simply can not get rid of the blank page. I expected this would be an issue if I used the Even or Odd Section Breaks, but i'm not.

    This means, for example, that it would be impossible to write a book with a new Chapter as a new section (say section 2), starting on the left hand page, with a page number of 2-1.

    Any help greatly appreciated!

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Section Page Numbering and Section Breaks (Word 20

    Welcome to Woody's Lounge!

    If you specify different odd and even headers/footers, Word forces odd-numbered pages to be on the right hand side and even-numbered pages to be on the left hand side. It will insert blank pages as needed for this purpose. If you turn off "different odd and even headers/footers", the blank pages should disappear.

  3. #3
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: Section Page Numbering and Section Breaks (Wor

    Hey, thanks for the reply.

    That's a bit of a shame. The reason i was asking is because i was writing a macro to automatically sort out the even / odd pages of a document, inserting blank pages and deleting them where required at the end of sections (a new section determined by the use of the Heading 1 style). The section breaks are necessary because we need the "section-page" format of page numbering. We need different even and odd page footers to get the page numbers in the right place.

    The problem is that my blank pages actually have the text 'Intentionally Blank' written on them, so I don't want the blank blank pages that WOrd introduces, if you see what I mean. It's great that Word tries to be helpful, but somehow i have to be able to automatically recognize and replace these blank blank pages with my "Intentionally Blank" pages.

    I'll get there in the end...

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Section Page Numbering and Section Breaks (Wor

    If you're doing this in VBA, you should be able to keep track of the pages and insert a page break where needed:

    obj.InsertBreak(wdPageBreak)

    where obj can be the Selection or a Range object. Then place the "This page intentionally left blank" (a contradictory statement) on the new page. This page will automatically replace the one that Word inserted.

  5. #5
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: Section Page Numbering and Section Breaks (Wor

    hi ,

    thanks again. Yes, i could insert a page break prior to the section break and put my text on it, which will replace the one auto-inserted by word. The difficulty is identifying if indeed I *need* to replace one that word has put in. I need to be able check the last page of a section, see if it's an even/odd page, determine if it's got my text on it or if it's a word inserted blank. If it's got my text on it and it's an even page, ok. If it's a word auto-blank page and it's on an even page, then replace with my blank page.

    trouble is from initial tests, if I back up one page from a section break using the selection functions, it seems to skips over the word auto-inserted page i.e. it doesn't seem to be in the page collection (if there is one). That means I can't think of how to detect if it's there or not.

    I think i'm going to write the macro thus:

    remove all section breaks prior to heading 1 styles (that's a valid rule for our template)
    page numbering set to continuous numbering
    fix the pages so that each new Heading 1 starts on an odd page (I have this macro working already)
    re-apply theh section breaks prior to heading 1
    set the page numbering back to what it was

    That way, word shouldn't add any extra pages because it should be ok in any case.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Section Page Numbering and Section Breaks (Wor

    You are correct that you can't position the insertion point in one of these inserted pages - they only exist in the printed output.

    You could inspect Selection.Information(wdActiveEndPageNumber). This will give you the physical page number in the document as it will be printed. If this decreases by 2 after moving back across a section break (for example from 15 to 13), you know that there is an inserted page before the section break.

  7. #7
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Section Page Numbering and Section Breaks (Wor

    I seem to recall this problem can be addressed by using an If field on an empty paragraph in front of each Heading 1. The basic premise is to try a nested field something like the following aircode
    [If [mod([page],2)]=0 "" "Para This page was meant to be blank but now isn't"]

    The square brackets would need to be field braces rather than manually typed parentheses.

    I don't have a machine running Word at the moment but this would be workable assuming that you included a style in the false case which forced a page break before.
    <post:=373,799>post 373,799</post:> is similar to this.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  8. #8
    2 Star Lounger
    Join Date
    Oct 2007
    Posts
    172
    Thanks
    0
    Thanked 2 Times in 1 Post

    Re: Section Page Numbering and Section Breaks (Wor

    Hi,

    thanks for the reply.

    I had various thoughts along those lines and in the end nothing seemed bullet-proof so i took a sledgehammer to it and basically in the macro removed section breaks, put the page numbering back to continuous (no chapter number) and then sorted out the pages to ensure each new 'section' (i.e. Heading 1) started on an odd page, adding "intentionally blank" pages where necessary. Then I put the section breaks back in and changed the numbering back to include the chapter number and start each section with page 1. Word no longer has a need to add empty pages of its own.

    It is slower obviously but it's not prohibitively slow. It's also a lot safer and less error prone. I've tried it on three large docs now (of several hundred pages) and it works a treat. I'm feeling quite smug at this point ;-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •