ActiveDocument.AttachedTemplate

R

Raph

Hi,

In Word 2003 with Windows XP I used to get the name of the attached
template with the command ActiveDocument.AttachedTemplate (ex.
Letter123.dot). The template would basically be on a fileserver in a
multi-user environment.

As we migrated to Windows 7 and Word 2010, the command
ActiveDocument.AttachedTemplate started to return something that looks
like temporary file names (ex. 2BGD34RF.dotm). I assume that Word
downloads the template (Letter.dotm) from the fileserver on the local
network to the user's temporary directory where a random name is
assigned to the template and ActiveDocument.AttachedTemplate return
the temporary file name.

Does anybody know if this reasoning is correct and if so does anybody
happen to know how to return the base filename of the template (in
this example Letter.dotm) without for example using a constant
variable in the template?

Thank you in advance

Raph.
 
S

Stefan Blom

To test if your assumption is correct, use the FullName property to get the name and path of the attached template. For example:

MsgBox ActiveDocument.AttachedTemplate.FullName

-- 
Stefan Blom
Microsoft Word MVP




---------------------------------------------
"Raph" wrote in message
Hi,

In Word 2003 with Windows XP I used to get the name of the attached
template with the command ActiveDocument.AttachedTemplate (ex.
Letter123.dot). The template would basically be on a fileserver in a
multi-user environment.

As we migrated to Windows 7 and Word 2010, the command
ActiveDocument.AttachedTemplate started to return something that looks
like temporary file names (ex. 2BGD34RF.dotm). I assume that Word
downloads the template (Letter.dotm) from the fileserver on the local
network to the user's temporary directory where a random name is
assigned to the template and ActiveDocument.AttachedTemplate return
the temporary file name.

Does anybody know if this reasoning is correct and if so does anybody
happen to know how to return the base filename of the template (in
this example Letter.dotm) without for example using a constant
variable in the template?

Thank you in advance

Raph.
 
R

Raph

Hi Stefan,

Thanks for your reply.

It seems that my assumption is somewhat correct. Nevertheless I don't
understand why this would happen.

I traced the filepath using some code. For some users the command
MsgBox ActiveDocument.AttachedTemplate.FullName yields in something
like this:

C:\Users\<username>\AppData\Local\Microsoft\Windows\Temporary Internet
Files\Content.MSO\DD5CCF5D.DOTM

When I use the same template it gives me the filename of the template
as it is specified on the fileserver, e.g.: G:\Dir\Template.dotm

I wonder why it would download the template for some users to a
temporary and local directory.

I assumed it could be linked to rights management.

I do have local admin rights on my machine and the other user doesn't.
Nevertheless, I've seen the correct full path for 2 users who also
have no local admin rights and where the group policy seems to be
applied correctly. So this explanation is not satisfying.

Basically I used ActiveDocument.AttachedTemplate to feed an Access
Database with the date, time as well as the name of the template for
statistical purposes. Needless to say that my stats are pretty
worthless right now.... :-(

Do you happen to have any further suggestion(s)?

Thanks in advance

Raph.

P.S. I'll also get in touch one more time with our sys team to look
into this.
 
S

Stefan Blom

It does seem as if this is a server setting, or a local setting that determines how a workstation interacts with the server. The latter alternative, at least theoretically, would explain why this happens on some systems but not on others. Sorry, I don't know what to suggest. I have no experience with network administration.

-- 
Stefan Blom
Microsoft Word MVP




---------------------------------------------
"Raph" wrote in message
Hi Stefan,

Thanks for your reply.

It seems that my assumption is somewhat correct. Nevertheless I don't
understand why this would happen.

I traced the filepath using some code. For some users the command
MsgBox ActiveDocument.AttachedTemplate.FullName yields in something
like this:

C:\Users\<username>\AppData\Local\Microsoft\Windows\Temporary Internet
Files\Content.MSO\DD5CCF5D.DOTM

When I use the same template it gives me the filename of the template
as it is specified on the fileserver, e.g.: G:\Dir\Template.dotm

I wonder why it would download the template for some users to a
temporary and local directory.

I assumed it could be linked to rights management.

I do have local admin rights on my machine and the other user doesn't.
Nevertheless, I've seen the correct full path for 2 users who also
have no local admin rights and where the group policy seems to be
applied correctly. So this explanation is not satisfying.

Basically I used ActiveDocument.AttachedTemplate to feed an Access
Database with the date, time as well as the name of the template for
statistical purposes. Needless to say that my stats are pretty
worthless right now.... :-(

Do you happen to have any further suggestion(s)?

Thanks in advance

Raph.

P.S. I'll also get in touch one more time with our sys team to look
into this.
 

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