Forum Discussion
Automatically update document styles
How about this:
1. Attach the Template and Enable Document-Level Updating
1. Display the Developer tab (File → Options → Customize Ribbon → check “Developer”).
2. On the Developer tab, click Document Template.
3. In the Templates and Add-ins dialog:
o Click Attach… and select your .dotx.
o Check Automatically update document styles.
o Click OK.
4. Save and close the document, then reopen it.
On open, Word will overwrite every style in your document with the ones from the template.
2. Use the Organizer to Copy Styles (One-Off or Batch)
If you’d rather leave “Automatically update” off—and manually control updates, you may:
1. Go to Developer → Document Template.
2. Click Organizer….
3. In the Organizer, copy styles from your template into your document (select all, click Copy).
4. Repeat this in each document (you can automate it via a macro if you have hundreds of files).
3. Automate via VBA Macro
For mass-updates without reopening every file manually, drop this into a .dotm in your default template:
Sub SyncStylesFromTemplate()
Dim t As Template
' Change path to your template
Set t = Templates("C:\path\to\YourTemplate.dotx")
' Attach and mark for update on open
With ActiveDocument
.AttachedTemplate = t.FullName
.UpdateStylesOnOpen = True
.Save
End With
End Sub
1. Open each target document.
2. Run SyncStylesFromTemplate (you can assign it to a keyboard shortcut).
3. Close and reopen the doc to pull in every updated style from the template.
Kidd_Ip thanks for that. I do that, because that's how I thought it work(s)(ed) but was then (unreliably) informed by MS that it doesn't overwrite existing styles. I was told that changes made to the styles in the attached DOTX are only reflected in "new" documents that are created with that style sheet, which left me sitting, head in hands trying to figure out if I was to chuck the lot out and take up beach-combing as a career option (tip....not many open positions for 'beach-combers' on LinkedIn)
And that seems to be (partially) true because some changes in the DOTX are made when opening a document, and others (like line-spacing .... a nightmare to navigate) appear not to change.
So as beach-combing isn't an option I'm going to persevere with this for now and quietly mutter exactly what I think of MS and their product range under my breath.
On a slight side note, you've touched on something...VBA. Is there a VBA group on here? I'm manipulating these Word documents using VBA in MSAccess (because clearly masochism is a big thing in my life) and I've another couple of issues which is testing the patience of an avid wanna-be beach-comber???