Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    May 2001
    Thanked 0 Times in 0 Posts

    Problem with headers/footers when inserting files (VBA and Word97)

    I am able to insert several Word files, each with different headers and footers into one Word file (which already has headers and footers) via VBA. I am using SectionBreaks to start a new section before Inserting each file. The problem I'm running into is trying to unlink the headers/footers for each file. I've been able to unlink the section header/footer but the section then shows the different header for the 1st page of the original document... which isn't wanted on the inserted file pages. Also, I'm loosing the footers from the inserted files. Any suggestions on what I'm doing wrong?

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    New York, NY
    Thanked 29 Times in 27 Posts

    Re: Problem with headers/footers when inserting files (VBA and Word97)

    This is hard to suss out, particularly without a code sample, but here are a couple of thoughts:

    (1) Suppose you start with a file that has one section, that's set up with a different first page header/footer. If you insert a (NewPage) section break, that new section will inherit the different first page header/footer characteristics of the first section - this could be accounting for what you're seeing after you add section breaks.

    (2) The page formatting for a given section is always going to be controlled by the section break that's after that section. In the case of the last section in a document, or a document with only one section, that section formatting info is contained in the last paragraph mark.

    When you insert a file at the end of an existing document, you are inserting everything except that last paragraph mark, so you are not brining along that section formatting. The section formatting that will get applied to the last section of the inserted file, is whatever section formatting is in effect at the end of the recipient document - this could explain why you're losing the footers from the inserted files.


Posting Permissions

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