Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-22-2021, 07:33 PM
troyw troyw is offline Bulk/Batch update Word documents Headers and footers Windows 10 Bulk/Batch update Word documents Headers and footers Office 2010
Novice
Bulk/Batch update Word documents Headers and footers
 
Join Date: Apr 2021
Posts: 5
troyw is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 04-22-2021, 08:28 PM
gmayor's Avatar
gmayor gmayor is offline Bulk/Batch update Word documents Headers and footers Windows 10 Bulk/Batch update Word documents Headers and footers Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #3  
Old 04-25-2021, 03:57 PM
troyw troyw is offline Bulk/Batch update Word documents Headers and footers Windows 10 Bulk/Batch update Word documents Headers and footers Office 2010
Novice
Bulk/Batch update Word documents Headers and footers
 
Join Date: Apr 2021
Posts: 5
troyw is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 04-25-2021, 08:09 PM
macropod's Avatar
macropod macropod is offline Bulk/Batch update Word documents Headers and footers Windows 10 Bulk/Batch update Word documents Headers and footers Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

See: https://www.msofficeforums.com/62942-post2.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 04-26-2021, 10:27 PM
troyw troyw is offline Bulk/Batch update Word documents Headers and footers Windows 10 Bulk/Batch update Word documents Headers and footers Office 2010
Novice
Bulk/Batch update Word documents Headers and footers
 
Join Date: Apr 2021
Posts: 5
troyw is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
I put this into my word doc with the header, and do I just run the macro in a different file?

I tried this and nothing happened. No errors but the file didnt update header
Reply With Quote
  #6  
Old 04-26-2021, 10:40 PM
macropod's Avatar
macropod macropod is offline Bulk/Batch update Word documents Headers and footers Windows 10 Bulk/Batch update Word documents Headers and footers Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #7  
Old 04-26-2021, 11:21 PM
troyw troyw is offline Bulk/Batch update Word documents Headers and footers Windows 10 Bulk/Batch update Word documents Headers and footers Office 2010
Novice
Bulk/Batch update Word documents Headers and footers
 
Join Date: Apr 2021
Posts: 5
troyw is on a distinguished road
Default

Sorry, new to the macros.

Do I combine these macros now? And then run the macro on my file with the header?
Reply With Quote
  #8  
Old 04-26-2021, 11:31 PM
macropod's Avatar
macropod macropod is offline Bulk/Batch update Word documents Headers and footers Windows 10 Bulk/Batch update Word documents Headers and footers Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #9  
Old 05-05-2021, 07:17 PM
troyw troyw is offline Bulk/Batch update Word documents Headers and footers Windows 10 Bulk/Batch update Word documents Headers and footers Office 2010
Novice
Bulk/Batch update Word documents Headers and footers
 
Join Date: Apr 2021
Posts: 5
troyw is on a distinguished road
Default

That works perfectly, Thank you so so much.

You've saved me a lot of time
Reply With Quote
Reply

Tags
beginner, header and footer, word 10

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bulk/Batch update Word documents Headers and footers 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
Bulk/Batch update Word documents Headers and footers 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

Other Forums: Access Forums

All times are GMT -7. The time now is 05:00 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft