How to get full path to template from the window "Templates andAdd-ins"?

A

avkokin

Hello.
How can I get previous full path to the attached template from the
window "Templates and Add-ins" (tab "Templates")? See screen:
http://clip2net.com/clip/m8665/1273836092-clip-20kb.jpg
I created one document from my template which locating into my flash
drive. This flash drive has name is "E:". When I moved the flash drive
on other PC, the name of flash drive was changed and got as "F:".
Meanwhile into that field I see my previous path to my template. That
is path I want to get.
If I running this macro:
Set tmpl = ActiveDocument.AttachedTemplate
tmplPath = tmpl.FullName
then I getting the path to global template. But it's not that I
wanted.
 
D

Doug Robbins - Word MVP

To start with, you should not work with documents directly from a flash
drive. Sooner or later, you will end up causing them to become corrupted.

When you open a document, if the template from which it is created is not
available in the location where it was when the document was created, the
normal.dot template will be substituted for it. This is by default (to
allow the moving a document from one computer to another) and cannot be
changed.

The only way that you could create a record of the template from which the
document was created would be to have a macro run when the document is
created that created either a custom document property or a document
variable that was populated with the name of the template.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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