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 / January 2005

Tip: Looking for answers? Try searching our database.

Templates save to a relative directory

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Christopher Andrews - 14 Jan 2005 18:23 GMT
Hi everyone,

I'm very new to VBA and need some help. I'm using Word 2003 running on
Windows 2000 and XP.

Currently, I have  the following directory structure setup; 3-4 templates
reside in the following folders marked with an asterisk (*). Each template
is particular to a subfolder in the Archived folder.

????Faxes*
?   ????Archived
?       ????APT
?       ????GPT
?       ????IMC
?       ????Insurance Companies
????Letters to Insurance Companies*
?   ????Appeals Letters*
?   ?   ????Archived
?   ?       ????APT
?   ?       ????GPT
?   ?       ????IMC
?   ?       ????Old Forms
?   ?           ????Insurance Appeal Letter Forms*
?   ????Archived
?   ?   ????APT
?   ?   ????GPT
?   ?   ????IMC
?   ????Claims Inquiry*
?       ????Archived
?           ????APT
?           ????G PT
?           ????IMC
????Letters to Patients*
?   ????Archive
?       ????APT
?       ????GPT
?       ????IMC
????Letters to Providers*
?   ????Archive
?       ????All Providers
?       ????APT
?       ????GPT
?       ????IMC
????Letters to Third Parties*
?   ????Archive
?       ????APT
?       ????GPT
?       ????IMC
????Management

Each template is particular to a subfolder in the Archived folder, i.e.
There is an APT, GPT and IMC template. What I would like to do is make it so
each template knows the correct location that it should be saved in. For
instance, if a template located in "Letters to Providers" named "Letter
to -APT" is opened it should be saved to  "Letters to
Providers\Archived\APT." How do I do this?

Thanks in advance,

Chris
Cindy M  -WordMVP- - 18 Jan 2005 10:57 GMT
Hi Christopher,

> Each template is particular to a subfolder in the Archived folder, i.e.
> There is an APT, GPT and IMC template. What I would like to do is make it so
> each template knows the correct location that it should be saved in. For
> instance, if a template located in "Letters to Providers" named "Letter
> to -APT" is opened it should be saved to  "Letters to
> Providers\Archived\APT." How do I do this?

I assume you really mean that documents created from the templates should be
saved to these locations?

In VBA you can get the path of the template used to create the document like
this:
   ActiveDocument.AttachedTemplate.Path

And the name using the .Name property. From this information you should be able
to derive the correct path to the subfolder.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
Christopher Andrews - 24 Jan 2005 05:06 GMT
Thanks!!!

> Hi Christopher,
>
[quoted text clipped - 27 lines]
> reply
> in the newsgroup and not by e-mail :-)
 
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.