none
Ms word macro - Header & Footer RRS feed

  • Question

  • Hi,

    In word document I need a macro to remove text from header & footer but keep it in the same page even there are section breaks exist.

    The text should not move to next page as well, it should remain in the same page.

    Is there any macro there?

    John

    Wednesday, June 11, 2014 9:29 AM

Answers

  • What you are asking is impractical in a document subject to edits and difficult to implement in a document that isn't subject to edits. Basically, it would require cutting the header content out of the header, reducing the page margins by a corresponding amount, then reinserting the header content at the top of each page, either in textboxes or by breaking any paragraphs that cross page boundaries prior to insertion in the body of the document. In the latter case, you'd need to insert manual page breaks throughout the document and, if you have paragraph justification and/or auto paragraph numbering, those would be messed up and would require extra processing to correct. On top of that, since Word uses the attached printer driver to handle the page layout, you could end up with content on the bottom of the page on your current setup appearing at the top of an otherwise empty page if you use a different printer - or even the same printer with a different driver or different settings.

    Cheers
    Paul Edstein
    [MS MVP - Word]

    Wednesday, June 11, 2014 12:34 PM