what registry key stores the default template directory path?

B

BRC

Word 2000/ win 2000 or
Word 2003/ win xp

Can anyone tell me the registry key where word finds the default
"Template" path? I am writing a install package to put a Word Template
(and some support files) on user machine.
To make it work the way i would like I have to reference the registry
key in the setup routine so that the .dot file is placed in that
directory. The second ? is, is it the same key for Word 2000 and Word
2003? Any help or direction would be appreciated.
Thks BRC
 
K

Klaus Linke

BRC said:
Word 2000/ win 2000 or
Word 2003/ win xp

Can anyone tell me the registry key where word finds the default
"Template" path? I am writing a install package to put a Word Template
(and some support files) on user machine.
To make it work the way i would like I have to reference the registry
key in the setup routine so that the .dot file is placed in that
directory. The second ? is, is it the same key for Word 2000 and Word
2003? Any help or direction would be appreciated.
Thks BRC


In Word2003, it should be

MsgBox System.PrivateProfileString("", _
"HKEY_CURRENT_USER\Software\Microsoft\" _
& "Office\11.0\Common\General", "UserTemplates")

Word 2000 likely the same, apart from 9.0 instead of 11.0?

Regards,
Klaus
 
B

BRC

Thank you for the reply. I am still not able to obtain a reference to
the template directory. I checked out the vb help file for
privateprofilestring examples and it gave code very similar to the last
post. when i tried the code in the example in vba it did retrurn a
reference but when i modified it to the to refer to the template
diagram, it returned blank msgbox.
Any other suggestion would be appreciated.
Thks BRC
 
J

Jezebel

There is no registry entry at all, unless the installation differs from the
default. The most reliable method is for your installation routine to start
a reference to Word and check

application.Options.DefaultFilePath(wdUserTemplatesPath)
 
K

Klaus Linke

Hi Jezebel,

Well, I just created a phantasy directory, set the user template path to
that, checked my code, and it worked.

Where do you think it's stored, if not in the registry? And what do you
think the registry key is good for?

BTW, if you looked in the registry and didn't find it, look in
HKEY_USERS/S-1-or-whatever. HKEY_CURRENT_USER (whoever's logged on) takes
its info from there.

Regards,
Klaus
 
K

Klaus Linke

What's the code that gave you an empty string? And didn't my code work?

Regards,
Klaus
 
J

Jezebel

As I said, it's stored in the registry if you set it to something *other
than* the default. But not otherwise.
 

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