 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Bob Berry Guest
|
Posted: Mon Apr 18, 2005 11:12 pm Post subject: Word template location |
|
|
Microsoft doesn't make it easy, do they? I have a requirement to allow a
user to open Word from within my Delphi app, opening a template. This
problem is different from my recent post.
Word does not allow you to browse to an appropriate template location.
Tools/Options/File Locations sets the template location... period. My
question is, how can I determine the template path for Word on machine x,
which could be Win2K or XP, with anything from Word97 forward? I need to
put the template there at install time so it can be used later. I browsed
the registry 'til I was blue in the face, and can find nothing I can use.
|
|
| Back to top |
|
 |
Steve M Guest
|
Posted: Tue Apr 19, 2005 1:32 am Post subject: Re: Word template location |
|
|
Hello Bob,
DefaultFilePath property applies to Options which is a property of a Word
Application
"Returns or sets default folders for items such as documents, templates,
and graphics. Read/write String."
MyWordApplication.Options.DefaultFilePath(wdUserTemplatesPath)
Or you can substitute wdWorkgroupTemplatesPath for workgroup templates, or
wdStartupPath for Global templates.
The new setting takes effect immediately.
"You can use an empty string ("") to remove the setting from the registry
(Windows 95 and Windows NT) or Word Settings ( (Macintosh)."
(From VBAWRD8.HLP)
hth
--
Steve
| Quote: | Microsoft doesn't make it easy, do they? I have a requirement to
allow a user to open Word from within my Delphi app, opening a
template. This problem is different from my recent post.
Word does not allow you to browse to an appropriate template location.
Tools/Options/File Locations sets the template location... period. My
question is, how can I determine the template path for Word on machine
x, which could be Win2K or XP, with anything from Word97 forward? I
need to put the template there at install time so it can be used
later. I browsed the registry 'til I was blue in the face, and can
find nothing I can use.
|
|
|
| Back to top |
|
 |
Bob Berry Guest
|
Posted: Tue Apr 19, 2005 2:02 am Post subject: Re: Word template location |
|
|
Thanks again.
"Steve M" <spamyenotsteve (AT) letyenotspamsilverlink (DOT) co.uk> wrote
| Quote: | Hello Bob,
DefaultFilePath property applies to Options which is a property of a Word
Application
"Returns or sets default folders for items such as documents, templates,
and graphics. Read/write String."
MyWordApplication.Options.DefaultFilePath(wdUserTemplatesPath)
Or you can substitute wdWorkgroupTemplatesPath for workgroup templates, or
wdStartupPath for Global templates.
The new setting takes effect immediately.
"You can use an empty string ("") to remove the setting from the registry
(Windows 95 and Windows NT) or Word Settings ( (Macintosh)."
(From VBAWRD8.HLP)
hth
--
Steve
Microsoft doesn't make it easy, do they? I have a requirement to
allow a user to open Word from within my Delphi app, opening a
template. This problem is different from my recent post.
Word does not allow you to browse to an appropriate template location.
Tools/Options/File Locations sets the template location... period. My
question is, how can I determine the template path for Word on machine
x, which could be Win2K or XP, with anything from Word97 forward? I
need to put the template there at install time so it can be used
later. I browsed the registry 'til I was blue in the face, and can
find nothing I can use.
|
|
|
| Back to top |
|
 |
George Birbilis Guest
|
Posted: Tue Apr 19, 2005 12:05 pm Post subject: Re: Word template location |
|
|
| Quote: | Word does not allow you to browse to an appropriate template location.
Tools/Options/File Locations sets the template location... period. My
question is, how can I determine the template path for Word on machine x,
which could be Win2K or XP, with anything from Word97 forward? I need to
put the template there at install time so it can be used later. I browsed
the registry 'til I was blue in the face, and can find nothing I can use.
|
note that you can always use RegMon (from www.sysinternals.com, free) to
monitor the registry changes that are done when you manually edit that
setting in Word (and press OK at the changes dialog)
-----
George Birbilis (birbilis (AT) kagi (DOT) com)
Microsoft Most Valuable Professional
MVP J# for 2004 & 2005
http://www.kagi.com/birbilis
--------------
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|