View Single Post
 
Old 03-20-2019, 04:54 PM
terenceyip terenceyip is offline Windows 10 Office 2019
Novice
 
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