BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Word template location

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation
View previous topic :: View next topic  
Author Message
Bob Berry
Guest





PostPosted: Mon Apr 18, 2005 11:12 pm    Post subject: Word template location Reply with 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
Steve M
Guest





PostPosted: Tue Apr 19, 2005 1:32 am    Post subject: Re: Word template location Reply with 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 (Cool (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





PostPosted: Tue Apr 19, 2005 2:02 am    Post subject: Re: Word template location Reply with quote



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 (Cool (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





PostPosted: Tue Apr 19, 2005 12:05 pm    Post subject: Re: Word template location Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.