locked
Batch Removal of Word Headers and Footers RRS feed

  • Question

  • Is there any native utility in Word 2007 or Word 2010 to remove the headers and footers from multiple documents in a batch-wise process?  The targeted document population contains a mix of .doc and .docx files.

    We are migrating to a new EDMS.  Our current headers/footers contain, for example, document numbers that will not be the same in the new system.  Therefore, we need to strip out all headers and footers from the native Word content before the migration.  Doing this manually will be prohibitively time consuming.

    Thanks,

    JCB


    JCB
    Friday, December 2, 2011 8:25 PM

Answers

All replies

  • A macro for doing a Find/Replace on all documents in a single folder is shown in http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm. That macro can be used as a framework for your task.

    The code related directly to Find/Replace would be changed to step through each section of each document, setting the text of each of the three headers and three footers (primary, odd page, and first page) to an empty string. Code of this sort can be found at http://www.word.mvps.org/FAQs/Customization/ReplaceAnywhere.htm.

    To catch both .doc and .docx files, add the question mark in the expression Dir$(PathToUse & "*.doc?")


    Jay Freedman
    MS Word MVP  FAQ: http://word.mvps.org
    Friday, December 2, 2011 9:08 PM
  • Thank you, Jay!
    JCB
    Friday, December 2, 2011 9:20 PM
  • Hi,

     

    I am writing to see how everything is going with this issue. Is the problem resolved? If there is anything I can do for you, please feel free to let me know.

     

    Best Regards, 

     

    William Zhou

    Forum Support

    -----------------------------------------------------------------------------------------

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, December 8, 2011 2:39 AM