April 9, 2024
Contribute to the Microsoft 365 and Office forum!
Click here to learn more 💡
May 10, 2024
Word Forum Top Contributors:
Applying Changes / Additions to Word Styles to "Old" Documents
Report abuse
Thank you.
Reported content has been submitted
You'll need to declare and define a string containing the name of the template that contains the changed styles. For example, if that template is the Normal.dotm template, then
Dim source As String
source = NormalTemplate.Name
If it's some other template, use something like
source = "C:\Users\<your name>\AppData\Roaming\Microsoft\Templates\MyTemplate.dotx"
You'll also need a loop that gets the path and file name of each document to which you want to copy the styles. That could be using the Dir() function to get each file name in a specified folder, or getting a list of files from a Word document or an Excel worksheet.
Within that loop, you need an inner loop that reads an array of names of styles to be copied, or that does a For Each on the template's Styles collection. Inside the inner loop, call the OrganizerCopy command with the Source argument set to the template's path and file name, the Destination argument set to the current document's path and file name, the Name argument set to the style's name, and the Object argument set to wdOrganizerObjectStyles.
The use of the OrganizerDelete method is similar. Note that the Source argument here is the path and file name of the document, not the template.
https://jay-freedman.info
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
To update existing Styles, you could use the macro in my post at:
For updating/adding Styles across multiple documents, see: http://www.msofficeforums.com/word-vba/10450-loop-through-listboxes-application-organizercopy-3.html#post28497
Paul Edstein
(Fmr MS MVP - Word)
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Updating document styles from template and transferring styles using the organizer don't affect the defaults.
Report abuse
Thank you.
Reported content has been submitted
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Question Info
Last updated October 5, 2021 Views 162 Applies to: