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.

how to find out path of template the Document is based on

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
acherony - 30 May 2006 14:37 GMT
HI,

I wrote templates and is saved in one folder Templates on Server.
In Templates is Folder Address and there are *.doc files with
addresses,which I use in my Templates to generate diferennt address in
Document.

My Path to the files was complety path example "C:\Doc\..\Templates\Address

but I would like to do relative path. It should find out the Path of .dot
file the document is based on + \address and that would be.

Q1: can I find out Path of the template the doc is based on.

or you have just another solution.

take in mind that the location of templates could change and that adress
folder/files
have to be in seperates doc due to administration.Can happent that address
change and then there is no need of changing the macros. just update the file
or path.

thanks
Dave Lett - 30 May 2006 14:42 GMT
Hi,

Can you use

Debug.Print ActiveDocument.AttachedTemplate.Path

HTH,
Dave

> HI,
>
[quoted text clipped - 21 lines]
>
> thanks
Helmut Weber - 30 May 2006 15:08 GMT
Hi Dave,

good to know,
You just kept me from posting a silly workaround.

First intellisense doesn't work with attached template,
and then there seem no properties to be found
in the object browser.

Any other such cases known to be aware of?

Signature

Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000 (German versions)

Dave Lett - 30 May 2006 19:43 GMT
Hi Helmut,

I don't know of similar cases, and I can't remember the last time
intellisense didn't work. I use the help files a lot (instead of the object
browser), and the topic for AttachedTemplate said that it returned a
Template object. The help topic for Template object showed all the
properties and methods that you can use with AttachedTemplate, so that's how
I put it together.

Dave

> Hi Dave,
>
[quoted text clipped - 6 lines]
>
> Any other such cases known to be aware of?

Rate this thread:






 
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.