Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-20-2019, 04:54 PM
terenceyip terenceyip is offline Run a macro on multiple docx. files Windows 10 Run a macro on multiple docx. files Office 2019
Novice
Run a macro on multiple docx. files
 
Join Date: Mar 2019
Posts: 3
terenceyip is on a distinguished road
Default


Quote:
Originally Posted by macropod View Post
Answering that question depends on what you expect the code to do that it's not doing.

Hello Macropod, thanks for your reply. What I intended to do was to copy the styles from a dotm file to hundreds of word files located in different subfolders, as well as replacing all heading 8 to heading 5, heading 7 to heading 4 and heading 9 to 6.


To this end, I simply copied the code from #16 and replaced the part between "With .Range.Find" and " .Execute Replace:=wdReplaceAll". But when I ran the macro, I ran into a "Compile error: Invalid or unqualified reference", and the ".Name" in the line ".SaveAs FileName:=strOutFold & .Name, AddToRecentFiles:=False" was highlighted.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Run a macro on multiple docx. files Run a macro on multiple docx. files Peter Carter Word VBA 27 12-15-2022 04:10 PM
Macro for multiple RTF files papapaleo Word VBA 1 07-28-2017 04:56 AM
Run a macro on multiple docx. files Seach ''WORD'' in multiple doc/docx files (different folders!) at the same time Abcde Word VBA 22 06-01-2017 10:33 PM
Run a macro on multiple docx. files Macro to change all text color to black in all docx files in a selected folder joewoods Word VBA 13 05-16-2016 06:29 PM
Run a macro on multiple docx. files looking for macro for multiple files bolk Word 3 05-03-2011 05:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:26 PM.


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