Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / May 2006

Tip: Looking for answers? Try searching our database.

what registry key stores the default template directory path?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BRC - 29 Apr 2006 18:01 GMT
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
Klaus Linke - 29 Apr 2006 19:11 GMT
> Word 2000/ win 2000  or
> Word 2003/ win xp
[quoted text clipped - 7 lines]
> 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
BRC - 29 Apr 2006 23:54 GMT
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
Jezebel - 30 Apr 2006 02:21 GMT
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)

> 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
[quoted text clipped - 4 lines]
> Any other suggestion would be appreciated.
> Thks BRC
Klaus Linke - 02 May 2006 05:30 GMT
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

> There is no registry entry at all, unless the installation differs from
> the default. The most reliable method is for your installation routine to
[quoted text clipped - 10 lines]
>> Any other suggestion would be appreciated.
>> Thks BRC
Jezebel - 02 May 2006 05:50 GMT
As I said, it's stored in the registry if you set it to something *other
than* the default. But not otherwise.

> Hi Jezebel,
>
[quoted text clipped - 25 lines]
>>> Any other suggestion would be appreciated.
>>> Thks BRC
Klaus Linke - 02 May 2006 06:05 GMT
Ah, ok. Thanks, and sorry for the misunderstanding.

Klaus

> As I said, it's stored in the registry if you set it to something *other
> than* the default. But not otherwise.
[quoted text clipped - 28 lines]
>>>> Any other suggestion would be appreciated.
>>>> Thks BRC
Klaus Linke - 02 May 2006 05:41 GMT
What's the code that gave you an empty string? And didn't my code work?

Regards,
Klaus

> 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
[quoted text clipped - 4 lines]
> Any other suggestion would be appreciated.
> Thks BRC
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.