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 :-)