A family of Microsoft word processing software products for creating web, email, and print documents.
Thank you
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The problem;-
The header and footers in a large batch of Word files have to be changed.
The logo, and several pieces of text in each file's header and footer needs to be changed.
I would like to replace the existing header and footer with a new replacement.
There are several hundered word file with an old header and old footer.
I do not want to change any other data or formatting in each of the target Word files, only the header and footer
So
Is there a macro that could replace the header and footer of a batch of word files , taking (copying, or reading ) the header
of a reference word file and inserting that header / footer into each of the traget files ?
A family of Microsoft word processing software products for creating web, email, and print documents.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Thank you
was this every achieved? does anyone have the code for this?
Given that there is a logo involved, it might be better to create a template that has the new header and footer and then use a batch process to open each document and create a new document from the template and set the .Range.FormattedText of the new document to the .Range.FormattedText of the old document and then save the new document with a name such as that of the old document to which you append - updated and then close them both before going on to the next file.
See thge code in the article "Find & ReplaceAll on a batch of documents in the same folder” at:
http://www.word.mvps.org/FAQs/MacrosVBA/BatchFR.htm
for how to set up a batch process
Hi, and thanks,
Is there any risk of the method damaging or altering any formatting contained in the existing document ? by that I mean structure, styles, bullets, lists, positioning of figures, etc, etc ?
I'm concerned about such side effects. That's why I hope to get advice on a ..replace a header.... type solution.
Thanks