Results 1 to 15 of 15
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    update TOC only updates page numbers - not text (WordXP)

    Hiya

    On WordXP - when we press the F9 key to update the table of contents: the result is it only updates the page numbers. & doesnt update the text.
    ie as our table of contents are based on styles ie heading 2, heading 3 - if they re-edit the text in that heading style & press the F9 key - the updated TOC doesnt display the edited text.

    is this an WordXP bug? or are we missing a set here ?
    many thanks Diana

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: update TOC only updates page numbers - not text (WordXP)

    Hi Diana:
    Are you selecting the TOC before pressing F9? You should get a dialog box that gives you a choice of updating the entire TOC or just the page numbers. If not, perhaps there's some corruption. You could show the field codes (Alt+F9), select & copy your field codes in the TOC, then delete the TOC, press Ctrl+F9, paste the field codes back inside the braces, & press F9.

    If that doesn't work, could you post the field codes for the TOC here?
    Hope this helps,

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: update TOC only updates page numbers - not text (WordXP)

    Hey Phil

    In XP - I'm selecting the TOC & pressing F9 & the TOC text doesnt update only the numbers. & no dialog box appears giving you a choice to update the entire TOC or just the page numbers.
    In W97 you didnt have have to select anything you could just have your cursor anywhere in the document & press F9 & the result was Word updated all your document fields.

    As requested heres my field codes { TOC T "HEADING 2,2,HEADING 3,3" F }
    I've had a look in WordXP help for TOC troubleshooting 'I made changes to my document, but the changes don't appear in the table of contents.'
    & it mentions you have to be in Outline View to display the Update TOC button & to use this button. When I'm in outline View when I press F9 it still doesnt update my TOC. I actually have to be in Outline View & click on the Update TOC button on the outline toolbar.

    What gives?
    Diana

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: update TOC only updates page numbers - not text (WordXP)

    Hi Diana:
    First, in previous versions & Word 2002, pressing F9 doesn't update all the fields in a document. It only updates the field(s) that is/are selected when you press F9 or the field, if any, immediately following the cursor. Otherwise, pressing F9 does nothing. On the other hand, the Update Table of Contents command will update any TOC in the document. However, it should give you a choice of pages vs. entire TOC.

    Nevertheless, when using TC fields, changing the text will NOT change the TOC unless you also change the TC field. e.g. if I have:

    .prn{ TC ".prn" f C l "1" }

    then .prn shows up in the TOC. If I change ".prn" to "print", it will read

    .print{ TC ".prn" f C l "1" }

    The TOC will not change. I must change the text inside the TC field for the text to change.

    Since you don't get a dialog box with a choice, I would try deleting & recreating the TOC from scratch & see if that helps.

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

    Re: update TOC only updates page numbers - not text (WordXP)

    In my version of Word XP, I get the same old nag screen asking whether I want to do the numbers or text - so it must be specific to a setting or that particular file.

    Have you checked to see if the TOC field is locked?

    If you create a file from scratch do you get the same behaviour? If not, can you attach a cut down version of the problem file?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #6
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: update TOC only updates page numbers - not text (WordXP)

    Hi Phil

    In Word97 - if you press F9 key it updates all the fields in the document including the TOC.
    We use headings styles in our TOC. & in XP in the text with heading 2 the text was amended >when the user pressed F9 - only the page numbers were updated.
    in XP the only way to display the screen is to go in outline view>& click on the UpdateTOC button.

    Diana

  7. #7
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: update TOC only updates page numbers - not text (WordXP)

    Hi Andrew

    When you mentioned in your version of WOrdXP - did you do a full install of Word? & does that mean when you just press the F9 key to update the TOC then the old nag screen appears prompting you to update the numbers only or the text?
    No I dont have the TOC field locked.

    Diana

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: update TOC only updates page numbers - not text (WordXP)

    Maybe your copy of Word 97 had the F9 key customized to first select all and then update?

    Can you post the field code for your TOC? If you use Alt+F9, it should simply be a single line. If it's too messy to retype, or if you just want to try something new, you can use the macro in <post#=291045>post 291045</post#> to convert it to postable text.

  9. #9
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: update TOC only updates page numbers - not text (WordXP)

    Hi Diana:
    I think that you may have a special UpdateFields macro or that F9 is assigned to that macro. Can you press Alt+Ctrl+NumPad Plus, then press F9 & tell me what command comes up. It should be UpdateFields, but it might be assigned to a macro.

    If you press Alt+F8 to open the macro dialog box, scroll to Word commands & then to UpdateFields, you can highlight it & press Run. This will run the native Word command. Does this give you the dialog box to update teh field or page numbers only?

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

    Re: update TOC only updates page numbers - not text (WordXP)

    Diana

    Yes, I did the full install and Yes, Word nags me to see whether I want to do the full update or just the page numbers.

    Have you explored whether your file/installation has a macro which is hijacking the normal action for update fields. Try Phil's suggestion to rule that out.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  11. #11
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: update TOC only updates page numbers - not text (WordXP)

    Hi Phil

    Yes I checked the F9 function key command & in Normal.dot the F9 key is assigned to UpdateFields.
    Perhaps I will just have to add /assign a key to display the dialog box to prompt user if they would like to update numbers or all TOC?
    my TOC fieldcode is ialso n one of the above posts { TOC T "HEADING 2,2,HEADING 3,3" F }

    Diana

  12. #12
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: update TOC only updates page numbers - not text (WordXP)

    One last thing, Diana. Try the second step of <post#=197827>post 197827</post#> of starting Word with the a switch to prevent all add-ins. Then try F9 again. Otherwise, I would recreate the TOC from scratch.

  13. #13
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: update TOC only updates page numbers - not text (WordXP)

    hey phil

    Yes I've tried run winword.exe /a with the switch - & opened the doc >pressed F9 - it updated all the TOC the 1st time. after that the same issue.
    In XP I'll just have to redo & update the TOC.

    thanks for your help. Diana

  14. #14
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: update TOC only updates page numbers - not text (WordXP)

    Hiya

    So the F9 function was attached to some code which updates all the fields in the doc. & one of the lines of code was:
    ActiveDocument.TablesOfContents(1).Update

    For XP I was planning to add some more code which updates the whole TOC in XP.
    ActiveDocument.TablesOfContents(1).UpdatePageNumbe rs
    ActiveDocument.TablesOfContents(1).UseHeadingStyle s = True

    however you have to specify the heading styles used - otherwise it pulls in all the heading styles in the TOC.
    do you know of a way of an automated way to update the TOC pagenumbers & the current styles used in the TOC.
    The thing is we have internal templates that use heading 2 & heading 3 in the TOC.
    However we also get client documents in & I've just checked one clients doc & the TOC is using heading style Level 1.
    so its not like i can hard-code to update styles eg

    With ActiveDocument.TablesOfContents(1)
    .UseHeadingStyles = True
    .UpperHeadingLevel = 2
    .LowerHeadingLevel = 3
    End With

    any ideas?
    Diana

  15. #15
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: update TOC only updates page numbers - not text (WordXP)

    It seems that Update should update everything while UpdatePageNumbers should just update the page numbers. It works backwards?? What if your macro simply selects the entire document and tries Selection.Fields.Update ?

Posting Permissions

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