• Automaticaly update Field codes in header (Office XP, Word 2002 SP-2)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Automaticaly update Field codes in header (Office XP, Word 2002 SP-2)

    Author
    Topic
    #378150

    I have a file with header and footer containing Field codes Title and Category. These can be edited in the File/Properties Summary dialog box. So far so good!
    (The file also contains macros for inserting Bookmarks.) The content of the field codes will not change when I close and opens the document again. I have to open the header, mark the field code, rightckick and click Update Field.

    How can I get Word to update these field codes automatically in the open document? It is possible to set Update fields in the Options dialog box/Print tab. But this only happens when the document is printed.

    I need to get these fields updated when I open the document and preferably also when the document is open(active) in Word. Can it be done by a vba code?

    This works OK with Office 2000: the content of the field code changes when I close and open the document again. But I cannot get it working in Office XP.

    Thanks a lot in advance

    Bj

    Viewing 0 reply threads
    Author
    Replies
    • #625003

      You can create an AutoOpen macro that runs when the document is opened. From AutoOpen you can call the procedure UpdateHeaderAndFooterFields that you will find in post 119527

      StuartR]

    Viewing 0 reply threads
    Reply To: Automaticaly update Field codes in header (Office XP, Word 2002 SP-2)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: