View Single Post
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor
 
Posts: n/a
Default Saving templates as .doc files

In the document template (not normal.dot) you could intercept the filesave
and filesaveas calls with the following code:

Sub FileSave()
Dim sFolder As String
sFolder = Options.DefaultFilePath(wdCurrentFolderPath)
'change the next line to your requirements
ChangeFileOpenDirectory "D:\My Documents\Test\Merge\"
Dialogs(wdDialogFileSaveAs).Show
ChangeFileOpenDirectory sFolder
ActiveWindow.Caption = ActiveDocument.FullName
End Sub
Sub FileSaveAs()
Dim sFolder As String
sFolder = Options.DefaultFilePath(wdCurrentFolderPath)
'change the next line to your requirements
ChangeFileOpenDirectory "D:\My Documents\Test\Merge\"
Dialogs(wdDialogFileSaveAs).Show
ChangeFileOpenDirectory sFolder
ActiveWindow.Caption = ActiveDocument.FullName
End Sub

When you save a new document created from this template, the macro saves the
current folder path to a variable, changes the folderpath to a folder of
your choice - here "D:\My Documents\Test\Merge\" - pops up the save as
dialog and then after saving in the chosen folder returns to the original
folder path and puts the current document path in the title bar.

As it stands it will not warn the user if the filename exists - and it is no
substitute for user training

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

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Per wrote:
Thanks for your help, the template file is no opening as a new
document. But maybe you can help me with this challenge.
After the document has been written I would like the user to save it
to a specific shared networkfolder. Normally when you like to save
it, Word suggest to save it in the folder you have choosed under
"File location". To be sure that the user save it to the folder i
would like him to save it I should like to foreordain the file
location when saving the file.

Thanks for any help on this.

Jean-Guy Marcil skrev:

Per was telling us:
Per nous racontait que :

Hello.
I have some word templates into a web folder stored at one of my
companys server. In the .html files its a link to the templates and
by clicking at the link the template is opening, but as a template
file.
I should like to open it as a copy and if possible when i choose
save or save as, directly to a folder that has been decided
earliere. The configuration should only be set up for the
templates, not to word as a general option.

Thanks for any help.


See

http://support.microsoft.com/default...us;278627&FR=1

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
ISTOO
Word MVP site:
http://www.word.mvps.org