Who needs this macro?
You may be wondering:
How do I copy styles from one document and another,
or a slight variation ...
How do I copy styles between Word documents without having to recreate them all again?
One approach is to use the Styles Organiser.
First, copy the styles from the source document to the Normal template.
Then copy styles again from the Normal template to the destination document.
However, you can create the following macro and attach it to a Quick Access icon to make the process one-click-simple.
For example if you have a collection of training manuals that all use the same styles then this technique is a perfect fit.
Here's the process to set that up.
Step #1: Create the master document
1. Create and save a master document that contains all your master styles. You may save the file as docx or dotx. It makes no difference to this process.
2. Open File Explorer and get the full path and filename of your master document as follows:
a) How to obtain the full pathname in Windows 10
If you are using Windows 10, locate your document then click in the address bar to see the full path and filename.
b) How to obtain the full pathname in Windows 11
If you are using Windows 11, locate your document then right-click it and choose Copy as path.
Step #2: Create the macro code
3. In any document press Alt F11 to open the Visual Basic Editor.
Depending on your keyboard setup, you may need to press Fn Alt F11.
4. On the left sidebar click Normal to select it, then select the Insert menu and choose Module,
5. In the main code window paste the following code, replacing xxxxx with the full path and file name from step 2 above.
6. Press F4 (if necessary) to display the Properties window on the left sidebar.
7. Next to (Name), type Copy_styles_from_master_doc - you can use any name but spaces aren't allowed.
8. Click X to close the code window. Changes are saved automatically.
Step #3: Create an icon to run the macro
9. Back in Word, click File | Options | Quick Access Toolbar.
10. Change Popular Commands to Macros.
11. Select the Normal.Copy_styles_from_master_doc macro.
12. Click Add >> between the 2 lists.
13. (Optional) Click Modify under the right-hand list.
14. (Optional) Choose any icon you like.
15. (Optional) Change the Display Name if you want.
16. Click OK to close the Symbol dialog.
17. Click OK to close the Word Options dialog.
The new icon to run the macro is now situated in the QAT.
Now, in any document, when you click the macro icon, all the styles from the master doc are copied to the current doc.
Any styles that already exist in the current document will be updated.
Any styles that do not exist in the current document will be added.
There are no confirmations or warnings.
I hope you found plenty of value in this post. I'd love to hear your biggest takeaway in the comments below together with any questions you may have.
Have a fantastic day.