Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-08-2022, 11:53 PM
Rzv Rzv is offline Modifying a macro for batch updating document headers Windows 10 Modifying a macro for batch updating document headers Office 2016
Novice
Modifying a macro for batch updating document headers
 
Join Date: Jun 2022
Posts: 3
Rzv is on a distinguished road
Default

The code works perfectly until it hits runtime error 5138
Hitting debug then points me to
Code:
.PageSetup.DifferentFirstPageHeaderFooter = True
Still, this is much better than doing things manually and if there is no fix I will just find a way to discover which document is the problem and just do it manually.
Thank you.
Edit:
I found the problem there are some weird documents with impossible margins, and I found a way to mass rename and remove the special chars from the filenames, the code is working as intended, thank you for your help!
Attached Images
File Type: png VBA Err 5138.png (6.3 KB, 16 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating Headers & Footers from Database Yuvahari Word VBA 5 01-31-2022 10:12 PM
Batch Replacing Headers using Macros JakeG9 Word VBA 0 07-13-2021 10:54 AM
Modifying a macro for batch updating document headers Bulk/Batch update Word documents Headers and footers troyw Word VBA 8 05-05-2021 07:17 PM
Modifying a macro for batch updating document headers Batch applying a macro to remove Header and Footer using Batch Auto Addin Edszx Word VBA 2 05-27-2019 11:16 PM
Updating headers in multiple files cellophane Word 3 01-17-2013 06:36 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:18 AM.


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