Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Dec 2000
    Location
    Montreal, Quebec, Canada
    Posts
    115
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update fields after closing Header (Office 2003 Word)

    Hello all,
    Created a simple macro that opens the first page header, positions the cursor where the user needs to insert text.
    I need to be able to update the cross reference in the other pages header (I know how to do) when the user closes the header (don't know how to do).
    How do I make Word run the UpdateFields macro I created when the user clicks OK in the header.
    tks

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

    Re: Update fields after closing Header (Office 2003 Word)

    You could hijack the CloseViewHeaderFooter command:

    Sub CloseViewHeaderFooter()
    ' Code to execute before closing Header/Footer view goes here
    ...
    ' Close header/footer view
    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
    ' Code to execute after closing Header/Footer view goes here
    ...
    End Sub

    Note: this command is executed when the user clicks Close in the Header/Footer toolbar, but unfortunately not when the user selects Normal View or Print Layout view from the View menu, or when the user double clicks in the main document.

  3. #3
    2 Star Lounger
    Join Date
    Dec 2000
    Location
    Montreal, Quebec, Canada
    Posts
    115
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Update fields after closing Header (Office 2003 Word)

    Perfect. Tks alot.

Posting Permissions

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