Copying Word Theme to another document using Excel VBA

12seth12

New Member
Joined
Oct 5, 2015
Messages
3
Hi,

Is there a way to use VBA to save the current Word Document's Theme as a file in a location that I choose?

Essentially VBA code to do the same as clicking on this:
Save_Theme_Button.png


Background: I'm working on an Excel macro that uses VBA coding to take a template document, make a copy of it and replace several items within the copy. My problem is the new copy doesn't have the same theme as the original (i.e. accent colors, etc.). My current setup: I've manually saved the theme ".thmx" somewhere and I'm using this line to load the saved theme: myDocument.ApplyDocumentTheme Filename:=myThemeLocation which works. I'm now trying to use VBA to save the original document's theme in case I change the theme later on.

My plan is to use this code so the macro opens template document, saves theme somewhere, apply it to copied document, then deletes the saved theme.

I'm using Word and Excel 2010.

Thanks
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,215,429
Messages
6,124,834
Members
449,192
Latest member
mcgeeaudrey

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top