Results 1 to 14 of 14
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    TOC pages reset to 1 on printing section (Word 2003)

    I have a word 2003 document with several sections: the first contains the TOC (table of contents) for the second section. If I print using "Print current page when I am on the TOC page, the page numbers in the TOC print correctly. But if I print by specifying the page number and section number option in the print dialogue box (p2s1) then suddenly all the page numbers revert to page 1.
    And they print that way. How can this be prevented. I want to use the page and section number method in .NET CODE (OR VBA) as you can't use the current page method in code, can you?

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

    Re: TOC pages reset to 1 on printing section (Word 2003)

    VBA can print the current page:

    ActiveDocument.PrintOut Range:=wdPrintCurrentPage

    (PS the problem doesn't occur in Word 2002 SP3)

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TOC pages reset to 1 on printing section (Word 2003)

    Thanks Hans. I can do that. But it seems 'inelegant', if I may presume to be so fussy.
    I guess my question is why do the page numbers change in the TOC when you print using the page and section option
    and can this be prevented or circumvented?
    David

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

    Re: TOC pages reset to 1 on printing section (Word 2003)

    I have no idea. It doesn't happen in my Word 2002 SP3, and I haven't been able to find any reference to it happening in Word 2003. Hopefully someone who has Word 2003 can help.

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

    Re: TOC pages reset to 1 on printing section (Word

    I also have no idea as to why you are getting this problem on such a specific print command.

    Is it related the Print Option which updates the fields in the document before printing? If you turn this off in Tools>Options>Print does it still occur?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TOC pages reset to 1 on printing section (Word

    Thanks for that suggestion. Unfortunately that isn't it; I checked and the box for 'update fields before printing' in Tools>Options>Print is not ticked.
    Then I tried one last time and GUESS WHAT??!! This time the page numbers did not revert to 1s. I tested this over and over on several printers and still the page numbers remained correct.
    Then I closed word, re-opened it and tried again. This time the pages numbers did revert to 1s - and ever since.
    Must be a bug. I will now re-boot and see if that fixes it.
    Weird.

  7. #7
    WS Lounge VIP
    Join Date
    Mar 2006
    Location
    Maryland, USA
    Posts
    690
    Thanks
    17
    Thanked 66 Times in 56 Posts

    Re: TOC pages reset to 1 on printing section (Word

    Did you try open and repair on your file? If Word finds a problem and repairs it (a broken bookmark perhaps?) your problems may be over.

    Sometimes Word will repair the file but doesn't get rid of the real cause of the problem. If that happens and if Word found problems with bookmarks, try deleting all the hidden TOC bookmarks and then updating (regenerating) your TOC--on a copy of your file, please. I don't have a macro to delete hidden bookmarks and I've never had enough of them to want to make one. But I'd bet someone on this list has one. On the other hand, if Word identified a problem styles, look for a char char style, particularly one that is linked to a heading style.

    Pam



    Pam
    Pam Caswell

  8. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TOC pages reset to 1 on printing section (Word 2003)

    Well, the problem persists with Word 2007 I have discovered, and it seems to be general and not specific to any one document.
    If I create a document with two sections and put page numbers starting from 1 commencing in the second section but put the TOC
    in the first section (the headers of which are not linked to the headers of the second section because I don't want page numbers in
    the first section) then the TOC updates and links correctly to the various heading styles in the second section but as soon as you
    try to print page 1 section 1 the TOC refreshes and all page numbers become the number '1'.
    Why?
    If it is because I shouldn't have the TOC in the first section, then why does the TOC work at all?
    That is, why can if function correctly if it is in the 'wrong' section until you hit PRINT?
    There's somethign I truly don't understand here.

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

    Re: TOC pages reset to 1 on printing section (Word 2003)

    Have you tried the suggestions by Pam Caswell?

  10. #10
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TOC pages reset to 1 on printing section (Word 2003)

    Yes, I've tried everything, including Pam's suggestions.
    I created a new document as a test and it still happens with this too.
    It would seem that if you put a table of contents in ANY section of a word document, it displays entries and page numbers
    for ALL sections but goes wrong when you print. The print action seems to make the Word fields refresh and the TOC field
    suddenly can only read from the section it is actually in; it can't read from other sections anymore. Why this variable behaviour exists
    I can only surmise is a design error.
    So, to solve my problem I put the TOC in the same section as the main part of the doc. (section 2)
    But I don't want page numbers on the table of contents! (silly)
    So, you can remove the page number from the first page (PAGE SETUP>LAYOUT>DIFFERENT FIRST PAGE) but I can't see how you remove them
    from the first TWO pages. (My TOC occupies two pages.) Unless you put the TOC in its own section and then we're back to the first problem.
    So, I would still like to know how to lock the TOC to prevent it from refreshing on printing.

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

    Re: TOC pages reset to 1 on printing section (Word 2003)

    You can select the toc and press Ctrl+F11 to lock it against updates (and later, Shift+Ctrl+F11 to unlock it).

  12. #12
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TOC pages reset to 1 on printing section (Word 2003)

    I will try that Hans,
    In the meantime I have made a screen video (attached) in avi format to show the even STRANGER behaviour when the TOC is in its own section but on two pages.
    The first page doesn't change on printing, but the second page of the TOC sets all page numbers to the same as the first entry on that page
    We clearly have a bug here.
    Sorry, I can't attach the screen video as it is too large but I will send screen shots if you need convincing!

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

    Re: TOC pages reset to 1 on printing section (Word 2003)

    I have no reason to doubt your description, but since I haven't been able to reproduce the problem or to find anything about it in Google, I can't offer a real solution.

  14. #14
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    314
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: TOC pages reset to 1 on printing section (Word 2003)

    Thanks Hans. I finally got the Ctrl-F11 to work (difficult to select a toc sometimes!)
    But this is a workaround isn't it?
    You shouldn't have to do this.

Posting Permissions

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