Re: A Macro to Save Files

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



The save part is easy - ActiveDocument.SaveAs "Path\Filename"

Getting the name for the file is where the work is and I would suggest that
you should have a userform in the template from which the documents are
created that has controls on it into which the user enters that information.
Almost certainly, the recipient and the name of the document are required in
the document somewhere and once the data is entered into the userform, the
code in the form could enter it into the document as well as save the
document with the required name.

See the article "How to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"JeanneJo" <JeanneJo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B3234332-1CBF-4703-BA37-53C5AAFB80AC@xxxxxxxxxxxxxxxx
I have an attorney who wants a specific naming convention for his files:

2006.11.20_[Atty Initials]_[Name of Document]_[Recipient].doc

The attorney initials would not exceed 3 spaces. Since there are several
associates/legal staff who are going to be required to implement this
method
for this particular attorney, I thought a macro would be the easiest way
of
getting the job done and ensure consistency for everyone involved.

Since I have yet to write a macro in Word, I thought this forum would be a
very good place to start gathering information for this project. Thank
you
in advance for any help you can provide me.


.



Relevant Pages

  • Re: Save just part of the document
    ... As far as books to learn VBA, I cannot really recommend any as I have never ... Doug Robbins - Word MVP ... So if user select case 1, UserForm ask him to fill in only FormFields ... belonging to this section and at the end is macro for printing only ...
    (microsoft.public.word.vba.general)
  • Re: Calendar Control Filling Formfield
    ... You would need to make sure that the macro that calls the userform is in the ... Doug Robbins - Word MVP ... Microsoft PowerPoint MVP ...
    (microsoft.public.word.vba.userforms)
  • Re: Using macros in forms
    ... For userform questions you would do better asking in the Userform or vba ... Word MVP web site http://word.mvps.org ... field where you want the cursor to be in your macro. ...
    (microsoft.public.word.docmanagement)
  • Re: Save just part of the document
    ... Doug Robbins - Word MVP ... So if user select case 1, UserForm ask him to fill in only FormFields ... belonging to this section and at the end is macro for printing only filled ...
    (microsoft.public.word.vba.general)
  • Re: Save just part of the document
    ... Doug Robbins - Word MVP ... So if user select case 1, UserForm ask him to fill in only FormFields ... belonging to this section and at the end is macro for printing only filled ... It could be made every section in single separate document but the goal is ...
    (microsoft.public.word.vba.general)