Copying Styles from the normal.dot

K

kpm

I created a macro that takes a series of styles from the Normal.dot, and
copies them to the document that is currently opened. The macro runs fine,
but I would like to push it out to about 450 other users. The problem I have
is the macro specifically points to a single user's Normal.dot. Is there a
way to automatically point the macro to the current Normal that is loaded?
Any help or input would be greatly appreciated. Below is the macro:

Sub CopyStyles()
'
' Copy Styles Macro
' Macro recorded 12/2/2004 by Butzel Long
'
With ActiveDocument
.UpdateStylesOnOpen = False
.AttachedTemplate = "Normal"
End With
Application.OrganizerCopy Source:= _
"C:\Documents and Settings\maaske\Application
Data\Microsoft\Templates\Normal.dot" _
, Destination:=ActiveDocument.FullName, Name:="TOC 1", Object:= _
wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
"C:\Documents and Settings\maaske\Application
Data\Microsoft\Templates\Normal.dot" _
, Destination:=ActiveDocument.FullName, Name:="TOC 2", Object:= _
wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
"C:\Documents and Settings\maaske\Application
Data\Microsoft\Templates\Normal.dot" _
, Destination:=ActiveDocument.FullName, Name:="TOC 3", Object:= _
wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
"C:\Documents and Settings\maaske\Application
Data\Microsoft\Templates\Normal.dot" _
, Destination:=ActiveDocument.FullName, Name:="TOC 4", Object:= _
wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
"C:\Documents and Settings\maaske\Application
Data\Microsoft\Templates\Normal.dot" _
, Destination:=ActiveDocument.FullName, Name:="TOC 5", Object:= _
wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
"C:\Documents and Settings\maaske\Application
Data\Microsoft\Templates\Normal.dot" _
, Destination:=ActiveDocument.FullName, Name:="Heading 1", Object:= _
wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
"C:\Documents and Settings\maaske\Application
Data\Microsoft\Templates\Normal.dot" _
, Destination:=ActiveDocument.FullName, Name:="Heading 2", Object:= _
wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
"C:\Documents and Settings\maaske\Application
Data\Microsoft\Templates\Normal.dot" _
, Destination:=ActiveDocument.FullName, Name:="Heading 3", Object:= _
wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
"C:\Documents and Settings\maaske\Application
Data\Microsoft\Templates\Normal.dot" _
, Destination:=ActiveDocument.FullName, Name:="Heading 4", Object:= _
wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
"C:\Documents and Settings\maaske\Application
Data\Microsoft\Templates\Normal.dot" _
, Destination:=ActiveDocument.FullName, Name:="Heading 5", Object:= _
wdOrganizerObjectStyles
End Sub
 
C

Charles Kenyon

I would suggest rethinking this. Put your styles in a global template along
with the macro. Have the macro copy the styles from the global template. See
http://addbalance.com/word/stylesheet.htm. You should _not_ be standardizing
normal.dot but rather using custom global templates for sharing interface
customizations, macros, autotext and custom document templates for sharing
styles and document content.

See http://addbalance.com/word/movetotemplate.htm for step-by-step
instructions on moving / sharing / copying / backing-up customizations
including AutoText, AutoCorrect, keyboard assignments, toolbars, macros,
etc.
 
K

kpm

This is a great solution and I found your articles extremely enlightening.
However, one of the issues I have is that each user may have slight
variations on the style. One users Heading 1 style may be centered, all
caps... and another may be left aligned, title caps... The reason I went
with the Normal idea is that a user can customize the style as they see fit,
in effect applying the changes to their individual profile. Then, their
style is copied to the doc, and not a global style that may not be useful to
them. Will what you propose do that, or will it automatically copy the same
styles to every user? Thanks.
 
C

Charles Kenyon

Ah... I think this is the first time I've seen a request to have individual
styles in a networked environment. Sounds like an interesting place.

Application.NormalTemplate.FullName will retrieve the name and path of the
normal.dot template.

If you are using the code from my style sheets page, the statement:

sThisTemplate = ThisDocument.FullName ' name and path of global template
Would be replaced with sThisTemplate =
Application.NormalTemplate.FullName ' name and path of normal template
-- 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://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
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.
 
K

kpm

Yes, we are unique! We are a law firm with 15 practice areas, each with
court specific guidelines and attorney specific criteria that needs to be
met. The language you sent is exactly what I was looking for. Thank-you
very much for your assistance.
 
C

Charles Kenyon

I'm a quirky lawyer myself, or I wouldn't spend so much time on these
newsgroups. You are welcome.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top