|
|
|
date: 29 Dec 2005 13:02:41 -0800,
group: microsoft.public.word.vba.customization
back
Template Saves File To Custom Filename/Directory
Here's what I want to do with Word 2003:
>From a custom template I've made (MS.dot), open and save files to a
directory OTHER than the one I've specified in Word's Options dialog OR
the most recently saved path, and use the template's Title Style
Definition as the filename in the directory. Then, when I'm NOT using
that template, have Word revert back to my "default" configuration.
I have Word options set to open documents from and save them to
"D:\Data," my default file location. I want MS.dot to open files from
and save them to "D:\Data\MS." I also want it to use as a filename
whatever I've designated as a Title Style Definition in the document.
Then, when I close a file based on the MS.dot and go back to using
Normal.dot, I want to revert to my default settings.
For example: Say I open a new MS.dot document, write a manuscript, and
title it, "MS Ten" (in the body of the manuscript, NOT in the file
properties dialog). I apply the template's Title Style Definition to
the words, "MS Ten." When I Save or Save As, I want the template to
save the file to "D:\Data\MS\MS Ten.doc." When I close the MS.dot
document and return to using my Normal.dot, I want Word to Save or Save
As to "D:\Data" and whatever filename I chose, per usual.
Can anyone tell me how to do this? It appears a combination of one or
two simple macros in MS.dot could accomplish it, but the "use last
saved location path" feature of Word is getting in my way.
Thanks in advance.
date: 29 Dec 2005 13:02:41 -0800
author: whaywardj
Re: Template Saves File To Custom Filename/Directory
Hi Whaywardj,
My feeling is that you probably need a pair of macros named FileSave and
FileSaveAs, one saved in ms.dot, the other in Normal.dot.
Or a single pair in Normal.dot that check the Path property or the
AttachedTemplate property of the ActiveDocument to determine to which
path the file should be saved.
Does that make any sense?
> Here's what I want to do with Word 2003:
>
> >From a custom template I've made (MS.dot), open and save files to a
> directory OTHER than the one I've specified in Word's Options dialog OR
> the most recently saved path, and use the template's Title Style
> Definition as the filename in the directory. Then, when I'm NOT using
> that template, have Word revert back to my "default" configuration.
>
> I have Word options set to open documents from and save them to
> "D:\Data," my default file location. I want MS.dot to open files from
> and save them to "D:\Data\MS." I also want it to use as a filename
> whatever I've designated as a Title Style Definition in the document.
> Then, when I close a file based on the MS.dot and go back to using
> Normal.dot, I want to revert to my default settings.
>
> For example: Say I open a new MS.dot document, write a manuscript, and
> title it, "MS Ten" (in the body of the manuscript, NOT in the file
> properties dialog). I apply the template's Title Style Definition to
> the words, "MS Ten." When I Save or Save As, I want the template to
> save the file to "D:\Data\MS\MS Ten.doc." When I close the MS.dot
> document and return to using my Normal.dot, I want Word to Save or Save
> As to "D:\Data" and whatever filename I chose, per usual.
>
> Can anyone tell me how to do this? It appears a combination of one or
> two simple macros in MS.dot could accomplish it, but the "use last
> saved location path" feature of Word is getting in my way.
>
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 :-)
date: Fri, 30 Dec 2005 11:57:05 +0100
author: Cindy M -WordMVP-
|
|