A simple macro to copy styles from one doc to another

AUTHOR:  JASON MORRELL 

Jason Morrell

One of the most common Microsoft Word questions that I get asked is:

How to I copy styles from one document and another,
or ...
How do I copy styles between Word documents without having to recreate them all again? 

Well, one approach is to use the Styles Organiser to first copy styles from the source document to the Normal template, then copy styles again from the Normal template to the destination document.

However, if your styles are well established in a category, e.g. a library of training manuals, that all follow the same format, then you can create the following macro and attach it to a Quick Access icon to make the process one-click-simple.

Here's the process to set that up.

1.  Create and save a master document that contains all your styles. Once set up, this will be the one place where you update your style preferences. Copy or take a note of the location (the drive letter and all the folders leading to your document) and the file name. You may save the file as docx or dotx. It makes no difference to this process.

2.  In any document press Alt F11 to open the Visual Basic Editor.

3.  On the left sidebar under Normal, right-click Modules, choose Insert, choose Module.

4.  In the main window (right side), paste this code, replacing the location and file name with those you noted in step 1 above.

Sub Copy_styles_from_master_doc()
    ActiveDocument.CopyStylesFromTemplate _
    Template:="C:\folder\folder\your_master_file_name.dotx"
End Sub

5.  Press F4 (if necessary) to display the Properties window on the left sidebar.

6.  Next to (Name), type Copy_styles_from_master_doc - you can use any name but spaces aren't allowed.

7.  Click X to close the code window. Changes are saved automatically.

8.  Back in Word, click File | Options | Quick Access Toolbar.

9.  Change Popular Commands to Macros.

10. Select the Copy_styles_from_master_doc macro.

11. Click Add >> between the 2 lists.

12. (Optional) Click Modify under the right-hand list and choose any icon you like.

13. Click OK. 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 style with the same name will be overwritten with the styles settings from the master doc. There are no confirmations or warnings.

Side note: You can find all the macro functionality on left end of the Developer ribbon. If you don't see Developer, select File | Options | Customise Ribbon then tick/check the Developer box.


Please feel free to post any questions you have into the comments below. And before you leave this page, I want to give you one quick little action item! 

ACTION ITEM: Comment below with ONE thing you picked up from this post and share how it has helped, or will help, you. It's good to share your successes because it encourages others and provides an instant boost.

Enjoy the rest of your day!

Jason Morrell blog signature
About Jason Morrell

About the author

Jason Morrell


Jason loves to simplify the hard stuff, cut the fluff and share what actually works. Things that make a difference. Things that slash hours from your daily work tasks. He runs a software training business in Queensland, Australia, lives on the Gold Coast with his wife and 4 kids and often talks about himself in the third person!

SHARE

Check the RELATED articles below

Read More
10 Steps to a Perfect Print Page Setup in Excel With Auto-Repeat Headings and Controlled Page Breaks
Read More
Excel Auditing Checklist: 2 Auto Features and 4 Tools to Quickly Identify and Rectify Errors BEFORE You Publish
Read More
Supercharge Your Cut and Paste: Popular Methods, Shortcuts and 2 Smarter Approaches
{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}
Office Mastery
>