• Update fields after closing Header (Office 2003 Word)

    Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Update fields after closing Header (Office 2003 Word)

    Author
    Topic
    #438738

    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

    Viewing 1 reply thread
    Author
    Replies
    • #1046882

      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.

    • #1046885

      Perfect. Tks alot.

    Viewing 1 reply thread
    Reply To: Update fields after closing Header (Office 2003 Word)

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

    Your information: