Saving a new Word document with a predefined name

T

thorsteinn

Hey

I'm working on creating a form in Word that I want to be able to save
with a certain file name. This file name should base its name on a
field in the form or something like that...

Any suggestions??
 
G

Greg

Maybe something like:

Sub MyFileSave()

Dim pFileName As String
pFileName = ActiveDocument.FormFields("Text1").Result
ActiveDocument.SaveAs FileName:=pFileName & ".doc"
End Sub
 
K

Klaus Linke

And if you don't want to immediately "SaveAs", see:

http://www.google.com/groups?thread...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Regards, Klaus
 

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