0

Can I set the value that MS word will use in the 'Save' dialog ?

Usually when a word document is saved, Word will select the first few words of the document in an attempt to auto-create a document name. But I have a textbox near the top of the document that will contain the customers name, and then the user exits the field I want to be able to set the value that word will use to save the document.

Any help is appreciated.

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by cguan_77
0

If I've read your post correctly I think your talking about changing the file name from something other than what Word suggest. I mean if you have a document with the single sentence "Hi there" in it, Word will use that as the filename, but you should be able to simply erase it and write a new name before saving.

0

If I've read your post correctly I think your talking about changing the file name from something other than what Word suggest. I mean if you have a document with the single sentence "Hi there" in it, Word will use that as the filename, but you should be able to simply erase it and write a new name before saving.

Yes, but I would like to do this programmatically. In theory word holds the name of the document somewhere and you should be able to get at it through VBA. If I let the user fill out the form and save it and suggest a name, you could get anything.

0

will this one help

Sub save_as()
Dim str As String

str = InputBox("Pls. enter filename to be saved")

 ActiveDocument.SaveAs FileName:=str & ".doc", FileFormat:=wdFormatDocument
End Sub
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.