Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Styles and Template
I have 179 files that have already been created and which I need to change
the styles for. I created a template with macros and custom styles. I've added it to the Templates and Add-ins for 6 users. The macros that are in that template work fine, but I can't get the styles to show up when the users add the template and open any one of the existing files. What am I missing? |
#2
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Styles and Template
The styles available at any time are those in the document itself, and in
the template on which the document is based. Styles in an add-in are not available. You can use the organiser (button on the Templates and Add-ins dialog) to copy styles from one document or template into a document. "Kirstin" wrote in message ... I have 179 files that have already been created and which I need to change the styles for. I created a template with macros and custom styles. I've added it to the Templates and Add-ins for 6 users. The macros that are in that template work fine, but I can't get the styles to show up when the users add the template and open any one of the existing files. What am I missing? |
#3
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Styles and Template
That isn't how global templates work. See
http://addbalance.com/word/stylesheet.htm for ideas. -- Charles Kenyon Word New User FAQ & Web Directory: http://addbalance.com/word Intermediate User's Guide to Microsoft Word (supplemented version of Microsoft's Legal Users' Guide) http://addbalance.com/usersguide See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome! My criminal defense site: http://addbalance.com --------- --------- --------- --------- --------- --------- This message is posted to a newsgroup. Please post replies and questions to the newsgroup so that others can learn from my ignorance and your wisdom. "Kirstin" wrote in message ... I have 179 files that have already been created and which I need to change the styles for. I created a template with macros and custom styles. I've added it to the Templates and Add-ins for 6 users. The macros that are in that template work fine, but I can't get the styles to show up when the users add the template and open any one of the existing files. What am I missing? |
#4
Posted to microsoft.public.word.pagelayout
|
|||
|
|||
Styles and Template
As others have indicated, this is not how global templates work. You could
attach a template to your documents and update the style definitions of similarly named styles to those of the other template eg the following macro will do that for all the documents in a folder. As written it applies normal.dot, but the template defined at NormalPath could be addressed to your template. Sub ApplyNormalTemplate() 'to all files in a folder Dim myFile As String Dim PathToUse As String Dim myDoc As Document Dim NormalPath 'set the location of Normal.dot NormalPath = Chr(34) & _ Options.DefaultFilePath(wdUserTemplatesPath) & _ "\Normal.dot" & Chr(34) With Dialogs(wdDialogCopyFile) If .Display 0 Then PathToUse = .Directory Else MsgBox "Cancelled by User" Exit Sub End If End With If Documents.Count 0 Then Documents.Close SaveChanges:=wdPromptToSaveChanges End If If Left(PathToUse, 1) = Chr(34) Then PathToUse = Mid(PathToUse, 2, Len(PathToUse) - 2) End If myFile = Dir$(PathToUse & "*.doc") While myFile "" Set myDoc = Documents.Open(PathToUse & myFile) With ActiveDocument .UpdateStylesOnOpen = True .AttachedTemplate = NormalPath End With myDoc.Close SaveChanges:=wdSaveChanges myFile = Dir$() Wend End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Kirstin wrote: I have 179 files that have already been created and which I need to change the styles for. I created a template with macros and custom styles. I've added it to the Templates and Add-ins for 6 users. The macros that are in that template work fine, but I can't get the styles to show up when the users add the template and open any one of the existing files. What am I missing? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Style lists in the Styles and Formatting task pane | Formatting Long Documents | |||
Adding Outline Styles to a template | Formatting Long Documents | |||
Global/Master Template | New Users | |||
template styles not applying correctly to document | Microsoft Word Help | |||
Using User Template Shows More Styles than defined | Microsoft Word Help |