#1
|
|||
|
|||
Bulk/Batch update Word documents Headers and footers
Hi,
I have never used macros before and was wondering if there was a way I could update the headers and footers for a folder full of word documents? Instead of going into each file 1 by 1. I need to update with a new company logo and the address. Hopefully this makes sense and someone can help. Thanks Im on Word 2010 |
#2
|
||||
|
||||
What you can do with one document, using a macro, you can do with many similar documents e.g. Document Batch Processes.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Do you know of any macros like this?
All the files are in one folder, just need to replace the header and footer with a picture and a new address. Please post the macro if you know of any. |
#4
|
||||
|
||||
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Quote:
I tried this and nothing happened. No errors but the file didnt update header |
#6
|
||||
|
||||
As advised in the link, you should add the macro to a document with your new header. As advised in the link, in addition to that macro, you need add the GetFolder function from post#1 in the thread:
Code:
Function GetFolder() As String Dim oFolder As Object GetFolder = "" Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0) If (Not oFolder Is Nothing) Then GetFolder = oFolder.Items.Item.Path Set oFolder = Nothing End Function
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
Sorry, new to the macros.
Do I combine these macros now? And then run the macro on my file with the header? |
#8
|
||||
|
||||
I've updated the code in the link to show how the two code blocks should appear in the VBE.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#9
|
|||
|
|||
That works perfectly, Thank you so so much.
You've saved me a lot of time |
Tags |
beginner, header and footer, word 10 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Update Path of Field in Headers and Footers | lisa99 | Word VBA | 1 | 04-28-2020 02:51 PM |
How to update Word 2016 custom mail merge fields in bulk? | dorian | Mail Merge | 1 | 09-23-2017 02:03 AM |
Macro for find/replace (including headers and footers) for multiple documents | jpb103 | Word VBA | 2 | 05-16-2014 04:59 AM |
Adding different headers and footers in Microsoft word | camzie | Word | 4 | 08-22-2013 06:39 PM |
Word 2008 for Mac Letterhead Template, headers and footers | haasro02 | Word | 0 | 12-15-2011 02:16 PM |