save doc name from user fields???

C

Cathy

I have a word fill-in form. Can I create a macro that
will automatically save using a specific file name. I
want the file name to come from the info the user enter
into 3 different form fields. Thanks.
 
D

Doug Robbins - Word MVP

Hi Cathy,

Use

Dim mydoc as document
Set mydoc = ActiveDocument
mydoc.SaveAs mydoc.FormFields("Name1").Result & " " &
mydoc.FormFields("Name2").Result & " " & mydoc.Formfields("Name3").Result &
".doc"

where Name1, Name2 and Name3 are the bookmark names assigned to the three
formfields. Note that the last two lines of the above code need to be all
on one line.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - 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