Transfer a template

T

tony

I have a document (A) whose format I want to apply to a number of
existing documents (B and C)
Is this possible? How?

Grateful for all suggestions,

T.
 
G

Graham Mayor

Assuming you have used the same style names etc., attach the document
template to the other documents.
If you download the splitmerge add-in
http://www.gmayor.com/individual_merge_letters.htm it includes a macro to
make a template from the current document. If you use macro that you can
attach that template.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

On reflection the macro in that template is error trapped to work with merge
documents so you would have to modify the code to work with a plain
document.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
T

tony

Assuming you have used the same style names etc., attach the document
template to the other documents.


Thank you, Graham.
I created a.dot from the model document a.doc, but I'm not clear about
attaching a.dot to b.doc
Moreover, judging by the fact that fonts and other features of b.doc
are different from those of a.doc
(even though the outline/layout of the two is the same), I cannot
assume the same styles in both.
With this in mind, how can I determine the styles of various portions
of a.doc and transfer them to b.doc?

T.
 
G

Graham Mayor

It is fairly straightforward to attach a template with vba

With ActiveDocument
.UpdateStylesOnOpen = True
.AttachedTemplate = "D:\Word Templates\Templatename.dot"
End With

however if the style names in the document don't match the stylenames in the
template it will not achieve anything useful.

If you wish to replace stylenames in a document with stylenames in a
different template, then you will have to know in advance which stylenames
will be replaced with which.

You can also copy styles from one document to another eg

Application.OrganizerCopy Source:="D:\Word Templates\Sample Style.dot",
_
Destination:="D:\My Documents\Test\Versions\Even\sample.doc", name:=
_
"Body Text", Object:=wdOrganizerObjectStyles

but unless the document you copy to has text formatted in those styles
nothing will change.

What you cannot do is automatically reformat a document to match another
document when the formatting styles are different in each.


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
T

tony

What you cannot do is automatically reformat a document to match another
document when the formatting styles are different in each.

Thet's good and categoric, Graham, which I appreciate. I'll learn a
little more about styles and do the job piecemeal.

Thanks again.

T.
 

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