Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    ASKER, Norway
    Posts
    277
    Thanks
    6
    Thanked 0 Times in 0 Posts

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

    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

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

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

    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>post 119527</post#>

    StuartR]

Posting Permissions

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