Macro & Style problem

L

Liza

I have been experiencing problems with the style format
since I made the upgrade from Word 2002 to Word 2003. I am
using a macro which opens a template that has all my
formatting needs.

For any reason, I can not make my new documents to follow
that format style. I would like to make those documents I
already created to follow my styles. How can I tell that
to Word 2003?

This is the code in the macro:

Attribute VB_Name = "Module1112"
Sub Master_Style_Load_QTP_QTD_ATP()
'
' Macro2 Macro
' Macro recorded 09/06/01 by Dan Stankovic
'
' QTP/QTD styles 10-09-03
' Referecne: ["F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\
' This macro will load into any MS Word document the
following MASTER STYLES
' from QTP-QTDMasterStylesF.dot:
'
' TITLE QTP-D, Titlem1, Titlem2 - Company Name
' Prepared,
' TOCm, TOC1, TOC2, TOC3, TOC4, TOC5, TOC6, TOC7,
TOC8, TOC9
' Heading 1, Heading 2, Heading 3, Heading 4, Heading
5, Heading 6
' Heading 7, Heading 8, Heading 9, Heading 1 ATP,
Heading 2 ATP, Heading 3 ATP
' CNW_box, Note_txt
' Body, Body 6ba, Body 6b, Body 6a
' Normal numbered, Normal -, Normal numbered ATP
' Results Black, Results, Plots, Photos, Step, Note
' Body TT, Caption, Caption C, Caption L,, Caption L
ATP
' Table Title,
' Table Cell Left B, Table Cell Left 0, Table Cell
Center 0
' Table Cell Left, Table Cell Center, Table Cell Left
10, Table Cell Center 10
' Normal, Note sub, Note sub1, Note sub ATP

If ActiveDocument.Path = "" Then
dataName$ = ActiveDocument.Name
Else
dataName$ = ActiveDocument.Path + "\" +
ActiveDocument.Name
End If

'SourceStles$ = "F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\QTP-QTDMasterStylesF"
SourceStles$ = "F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\QTP-
QTDMasterStylesF.dot"
With ActiveDocument
.UpdateStylesOnOpen = True
'' .AttachedTemplate
= "F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\QTP-
QTDMasterStylesF.dot"
.AttachedTemplate
= "F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\QTP-
QTDMasterStylesF.dot"
End With

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Normal", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Note sub", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Note sub1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Note sub ATP", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 1 ATP", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 2 ATP", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 3 ATP", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TITLE QTP-D", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TITLEM", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TITLEM1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Titlem2 - Company Name", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Prepared", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Head1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 2", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 2 con't", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 3", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 4", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 5", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 6", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 7", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 8", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 9", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOCm", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 2", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 3", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 4", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 5", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 6", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 7", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 8", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 9", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="CNW_box", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="NOTE_txt", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body 6ab", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body 6b", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body 6a", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body Text Indent 2", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Plots", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Photos", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Normal numbered", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Normal numbered ATP", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Normal -", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Results black", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Results", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Step", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Note", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body TT", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Caption", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Caption C", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Caption L", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Caption L ATP", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Title", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Center", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left B", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left 0", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Center 0", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left 10", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Center 10", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left 10-0", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Center 10-0", _
Object:=wdOrganizerObjectStyles

With ActiveDocument
.UpdateStylesOnOpen = False
.AttachedTemplate = ""
End With


End Sub
 
T

the beach

Hey Lisa... your name would not be Don... this is the macro I created a
few years back... you could have stuck your head over the divider and
just asked for help<lol>

Answer... worst case scenario... create a template using Word 2003.
Also you may have to redo your styles in Word 2003 (if the template is
not enough).

All this may be a lot of work (say 4hours)... but your problem should
be fixed.

uhmmmm, Lisa (DON) hope that helps<lol>
I have been experiencing problems with the style format
since I made the upgrade from Word 2002 to Word 2003. I am
using a macro which opens a template that has all my
formatting needs.

For any reason, I can not make my new documents to follow
that format style. I would like to make those documents I
already created to follow my styles. How can I tell that
to Word 2003?

This is the code in the macro:

Attribute VB_Name = "Module1112"
Sub Master_Style_Load_QTP_QTD_ATP()
'
' Macro2 Macro
' Macro recorded 09/06/01 by Dan Stankovic
'
' QTP/QTD styles 10-09-03
' Referecne: ["F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\
' This macro will load into any MS Word document the
following MASTER STYLES
' from QTP-QTDMasterStylesF.dot:
'
' TITLE QTP-D, Titlem1, Titlem2 - Company Name
' Prepared,
' TOCm, TOC1, TOC2, TOC3, TOC4, TOC5, TOC6, TOC7,
TOC8, TOC9
' Heading 1, Heading 2, Heading 3, Heading 4, Heading
5, Heading 6
' Heading 7, Heading 8, Heading 9, Heading 1 ATP,
Heading 2 ATP, Heading 3 ATP
' CNW_box, Note_txt
' Body, Body 6ba, Body 6b, Body 6a
' Normal numbered, Normal -, Normal numbered ATP
' Results Black, Results, Plots, Photos, Step, Note
' Body TT, Caption, Caption C, Caption L,, Caption L
ATP
' Table Title,
' Table Cell Left B, Table Cell Left 0, Table Cell
Center 0
' Table Cell Left, Table Cell Center, Table Cell Left
10, Table Cell Center 10
' Normal, Note sub, Note sub1, Note sub ATP

If ActiveDocument.Path = "" Then
dataName$ = ActiveDocument.Name
Else
dataName$ = ActiveDocument.Path + "\" +
ActiveDocument.Name
End If

'SourceStles$ = "F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\QTP-QTDMasterStylesF"
SourceStles$ = "F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\QTP-
QTDMasterStylesF.dot"
With ActiveDocument
.UpdateStylesOnOpen = True
'' .AttachedTemplate
= "F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\QTP-
QTDMasterStylesF.dot"
.AttachedTemplate
= "F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\QTP-
QTDMasterStylesF.dot"
End With

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Normal", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Note sub", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Note sub1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Note sub ATP", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 1 ATP", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 2 ATP", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 3 ATP", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TITLE QTP-D", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TITLEM", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TITLEM1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Titlem2 - Company Name", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Prepared", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Head1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 2", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 2 con't", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 3", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 4", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 5", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 6", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 7", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 8", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 9", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOCm", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 2", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 3", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 4", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 5", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 6", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 7", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 8", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 9", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="CNW_box", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="NOTE_txt", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body 6ab", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body 6b", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body 6a", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body Text Indent 2", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Plots", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Photos", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Normal numbered", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Normal numbered ATP", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Normal -", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Results black", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Results", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Step", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Note", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body TT", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Caption", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Caption C", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Caption L", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Caption L ATP", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Title", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Center", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left B", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left 0", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Center 0", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left 10", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Center 10", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left 10-0", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Center 10-0", _
Object:=wdOrganizerObjectStyles

With ActiveDocument
.UpdateStylesOnOpen = False
.AttachedTemplate = ""
End With


End Sub
 
C

Charles Kenyon

Lisa's original post didn't make it onto my computer.

Any chance that the master template is in a different path on your new
system?

What follows is code I use for a similar item. Perhaps it will help.

Sub PleadingStyleTransfer()
'
' PleadingStyleTransfer Macro
' Macro written 14 November 2001 by Charles Kyle Kenyon
'
On Error GoTo NoDocument 'In case called when no document is open.
Dim sThisTemplate As String
Dim sTargetDoc As String
Dim i As Integer
Dim iCount As Integer
Dim rResponse As Variant 'vbMsgBoxResult in Word 2000 or later
sThisTemplate = ThisDocument.FullName
sTargetDoc = ActiveDocument.FullName 'generates error if no document
open
rResponse = MsgBox(Prompt:="This command redefines your Body Text Style
and" _
& vbCrLf & "Heading Styles 1-9. Are you sure you want to do this?" _
& vbCrLf & vbCrLf & "If you are not sure, answer 'No' and make a
backup of your document." _
& vbCrLf & "Then run the command to copy the styles again.", _
Title:="Are you sure you want to redefine your styles?", _
Buttons:=vbYesNo + vbExclamation)
If rResponse = vbNo Then Exit Sub
On Error Resume Next
' Copy Body Text and Pleading Styles to Active Document
For i = 1 To 3 ' copy styles three times
StatusBar = "Copying Styles - Round " & i & " of 3"
With Application
.OrganizerCopy Source:=sThisTemplate, _
Destination:=sTargetDoc, Name:="Body Text,bt,bt1", Object:=
_
wdOrganizerObjectStyles
StatusBar = i & "/3: Body Text"
For iCount = 1 To 9
.OrganizerCopy Source:=sThisTemplate, _
Destination:=sTargetDoc, Name:= _
"Heading " & iCount & ",h" & iCount & ",Pleading " &
iCount _
& ",p" & iCount, Object:= _
wdOrganizerObjectStyles
StatusBar = i & "/3: Pleading " & iCount & " copied"
Next iCount
End With
Next i
StatusBar = "All styles copied."
' Change to Pleading 1 style?
rResponse = MsgBox(Prompt:="Change to Pleading 1 style and go into
Outline view?", _
Buttons:=vbYesNo, Title:="Pleading Styles Imported - start
writing?")
If rResponse = vbYes Then
Selection.Style = ActiveDocument.Styles("Heading 1,h1,Pleading
1,p1")
ActiveWindow.ActivePane.View.Type = wdMasterView
Else 'not now - then reminder
MsgBox Prompt:="The style to start your pleading is Pleading 1 or
p1." _
& vbCrLf & "It is probably easiest to work in Outline view."
End If
Exit Sub
NoDocument:
MsgBox Prompt:="Sorry, this command is only available when you have a
document open." _
& vbCrLf & "It should be used after you have your caption set up.", _
Title:="No document open!", Buttons:=vbExclamation
End Sub

It works in Word 2003. The macro is in a template that (1) contains the
styles and (2) is loaded as an Add-In. That way, it finds its own path.

Note that it copies the styles three times. I do this to maintain links
between the style definitions. I know it was necessary to do this in Word 97
and 2000, not sure about Word 2003 but it doesn't hurt. It contains an error
handler message box in case the procedure is run without an open document.
An alternative might be to open a new document and run it.


the beach said:
Hey Lisa... your name would not be Don... this is the macro I created a
few years back... you could have stuck your head over the divider and
just asked for help<lol>

Answer... worst case scenario... create a template using Word 2003.
Also you may have to redo your styles in Word 2003 (if the template is
not enough).

All this may be a lot of work (say 4hours)... but your problem should
be fixed.

uhmmmm, Lisa (DON) hope that helps<lol>
I have been experiencing problems with the style format
since I made the upgrade from Word 2002 to Word 2003. I am
using a macro which opens a template that has all my
formatting needs.

For any reason, I can not make my new documents to follow
that format style. I would like to make those documents I
already created to follow my styles. How can I tell that
to Word 2003?

This is the code in the macro:

Attribute VB_Name = "Module1112"
Sub Master_Style_Load_QTP_QTD_ATP()
'
' Macro2 Macro
' Macro recorded 09/06/01 by Dan Stankovic
'
' QTP/QTD styles 10-09-03
' Referecne: ["F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\
' This macro will load into any MS Word document the
following MASTER STYLES
' from QTP-QTDMasterStylesF.dot:
'
' TITLE QTP-D, Titlem1, Titlem2 - Company Name
' Prepared,
' TOCm, TOC1, TOC2, TOC3, TOC4, TOC5, TOC6, TOC7,
TOC8, TOC9
' Heading 1, Heading 2, Heading 3, Heading 4, Heading
5, Heading 6
' Heading 7, Heading 8, Heading 9, Heading 1 ATP,
Heading 2 ATP, Heading 3 ATP
' CNW_box, Note_txt
' Body, Body 6ba, Body 6b, Body 6a
' Normal numbered, Normal -, Normal numbered ATP
' Results Black, Results, Plots, Photos, Step, Note
' Body TT, Caption, Caption C, Caption L,, Caption L
ATP
' Table Title,
' Table Cell Left B, Table Cell Left 0, Table Cell
Center 0
' Table Cell Left, Table Cell Center, Table Cell Left
10, Table Cell Center 10
' Normal, Note sub, Note sub1, Note sub ATP

If ActiveDocument.Path = "" Then
dataName$ = ActiveDocument.Name
Else
dataName$ = ActiveDocument.Path + "\" +
ActiveDocument.Name
End If

'SourceStles$ = "F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\QTP-QTDMasterStylesF"
SourceStles$ = "F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\QTP-
QTDMasterStylesF.dot"
With ActiveDocument
.UpdateStylesOnOpen = True
'' .AttachedTemplate
= "F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\QTP-
QTDMasterStylesF.dot"
.AttachedTemplate
= "F:\TSO\Archive\MASTER\Utility\Reports &
Documents\Reference\Style Templates\QTP-
QTDMasterStylesF.dot"
End With

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Normal", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Note sub", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Note sub1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Note sub ATP", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 1 ATP", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 2 ATP", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 3 ATP", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TITLE QTP-D", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TITLEM", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TITLEM1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Titlem2 - Company Name", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Prepared", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Head1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 2", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 2 con't", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 3", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 4", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 5", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 6", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 7", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 8", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Heading 9", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOCm", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 1", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 2", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 3", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 4", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 5", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 6", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 7", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 8", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="TOC 9", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="CNW_box", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="NOTE_txt", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body 6ab", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body 6b", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body 6a", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body Text Indent 2", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Plots", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Photos", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Normal numbered", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Normal numbered ATP", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Normal -", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Results black", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Results", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Step", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Note", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Body TT", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Caption", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Caption C", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Caption L", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Caption L ATP", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Title", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Center", _
Object:=wdOrganizerObjectStyles

Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left B", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left 0", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Center 0", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left 10", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Center 10", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Left 10-0", _
Object:=wdOrganizerObjectStyles
Application.OrganizerCopy Source:= _
SourceStles$, Destination:= _
dataName$, Name:="Table Cell Center 10-0", _
Object:=wdOrganizerObjectStyles

With ActiveDocument
.UpdateStylesOnOpen = False
.AttachedTemplate = ""
End With


End Sub
 

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