How do I auto-name a file using form text box?

S

shan

I have created a form using form text fields. I would like to have the file
auto-save from the text field I have bookmarked as "from", upon exit from
this field.

Does anyone know what macro I would need to use to make this happen?

Thanks
 
D

Doug Robbins - Word MVP

Create a macro that is run on exit from the "from" bookmarked field that
contains the code

With ActiveDocument
.SaveAs .Formfields("From").Result
End With

If you need to add the path, use

.SaveAs "Driveletter:\path\" & .Formfields("From").Result

--
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
 

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