Hi TBolt,
> I want a document to automatically have the file name entered when an
> employee clicks save or the save as. The file name will be a combination of
[quoted text clipped - 6 lines]
>
> Word 2003
You could try something along these lines. The "FileSave" and "FileSaveAs"
subs intercept the built-in commands of the same name so that when the user
clicks those buttons or uses the keyboard shortcuts your code is executed.
You'll find instructions on mvps.word.org on how to use macros people give
you in the newsgroups. You want to insert a new module in the form template
(or document, you don't specify) and copy the code to that. Substitute the
file path you want to use in the CustomSave procedure.
Sub FileSave()
CustomSave
End Sub
Sub FileSaveAs()
CustomSave
End Sub
Sub CustomSave()
Dim fileName as String
fileName = "C:\pathInfo\"
fileName = fileName & _
ActiveDocument.Formfields("Text6").Result & _
ActiveDocument.Formfields("Text70").Result & _
".doc"
ActiveDocument.SaveAs fileName
End Sub
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :-)