Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copying a Style from a template w/o Copying Fonts

Status
Not open for further replies.

fishey

Instructor
Oct 30, 2002
24
US
I have created a macro and assigned it to a toolbar. The macro allows me to copy into the active document (using the Organizer) all styles from a template (XYZ.dot) stored in the Word's Startup folder. The styles in XYZ.dot are based on that template's Normal style.

However, when the styles are copied into the active document, I would like them to become based on the ACTIVE DOCUMENT'S NORMAL STYLE rather than the template's normal style, so that the fonts in the newly copied styles are not different from the fonts in my active document. Any suggestions?
 
Use the Font property

use a variable to assign the current font style to it

ActiveDocument.Select
fontname = Selection.Font.Name

Then when you copy and paste from the template

With Selection
.Font.Name = fontname
End With

Rich
 
Thank you, finanl, for the wonderful tip! This is just what I needed to get the job done!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top