Applying Changes / Additions to Word Styles to "Old" Documents

I have made a lot of changes to my styles and even added and deleted other styles.  

How do I automatically/en masse apply the new/changed styles to already existing documents?  I am familiar with VBA if that helps.

TIA
Use the Application.OrganizerCopy method in a macro to copy the changed styles from the template that contains them to each document that needs the new definitions. Similarly, use the Application.OrganizerDelete method to remove unneeded styles from the documents. Type these method names in the VBA editor and press F1 to see their descriptions and syntaxes.

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

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.

Cheers
Paul Edstein
(Fmr MS MVP - Word)

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.

Another option is to add all of your changed styles to the styles gallery, including normal,  and save the gallery to a style set. Applying the style set will add to the styles to or change the style settings in the destination document and change its defaults.  Changing the defaults ensures that the styles will in a style set will be the same every time. If you were careful to keep the settings in normal and the defaults the same in the original document (& in the style set template), then you'll have better behaving table fonts/styles and more reliable pasting.  

Updating document styles from template and transferring styles using the organizer don't affect the defaults.


Pamelia Caswell

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: