Specific Working directory for each template?

I

Ian R

Hi

I've created a few templates which work fine but I have two questions...

1. For each template I use, I always save the resulting document to a
specific folder. e.g. if I have a template called "Work.dot" the docs I
create with it I always save to "My Documents/Work". The problem is when I
click save Word always defaults to the generic "My Documents" so I have to
manually navigate to the specific folder.

Unless I'm mistaken I vaguely recall reading that its possible to create a
working directory for each template so that when I click SAVE the document
will automatically go to "My Documents\Folder xxx". I'd be grateful if
anyone could tell me how this is achieved.

2. I created several templates from old documents. Each time I click to save
the created doc, it automatically fills in the file name with the same line
of text, but I cant see where its getting that text from. I know Word
usually takes the first line of text of the doc, but in my case the
templates seem to have inherited this text from the docs they were based on.
It doesn't appear anywhere in the body or the header/footer of the template
or the doc. Any ideas where it might be getting it from or how I can clear
it?

Thanks a lot

Ian
 
P

Pc u

It might be getting the filename text from the title of the document. Click
File-Properties and select the Summary tag, and clear the Title textbox. Word
sometimes automatically fills the title field if the document used to have
text.
 
G

Graham Mayor

You can do this by intercepting the save and saveas commands in your
template and inserting your own code to direct the files to the required
location. Save the following macros in the document templates (not in
normal.dot) and change the path from C:\Temp to where you actually want the
documents from that template to be saved. The code will also add the path to
the Word title bar to provide visual confirmation.

Sub FileSaveAs()
ChangeFileOpenDirectory "C:\Temp\"
Dialogs(wdDialogFileSaveAs).Show
ActiveWindow.Caption = ActiveDocument.FullName
End Sub

Sub FileSave()
ChangeFileOpenDirectory "C:\Temp\"
ActiveDocument.Save
ActiveWindow.Caption = ActiveDocument.FullName
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top