can anyone tell me if its posible to find out what the template name is from
which a document is created from.
if i create a new document from template called minute is there vba code i
can use to see the template behind this document is called minute?
Graham Mayor - 29 Dec 2006 12:12 GMT
This is well documented in Word's vba help?
Set myTemplate = ActiveDocument.AttachedTemplate
MsgBox myTemplate.Path & Application.PathSeparator _
& myTemplate.Name

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> can anyone tell me if its posible to find out what the template name
> is from which a document is created from.
>
> if i create a new document from template called minute is there vba
> code i can use to see the template behind this document is called
> minute?
Lene Fredborg - 29 Dec 2006 12:15 GMT
The VBA code:
ActiveDocument.AttachedTemplate
returns the name of the template that is currently attached to the active
document.
Example:
If ActiveDocument.AttachedTemplate = "minute.dot" Then
'Do something
Else
'Do something else
End If

Signature
Regards
Lene Fredborg
DocTools – Denmark
www.thedoctools.com
Document automation – add-ins, macros and templates for Microsoft Word
> can anyone tell me if its posible to find out what the template name is from
> which a document is created from.
>
> if i create a new document from template called minute is there vba code i
> can use to see the template behind this document is called minute?