A
Associates
Hi,
Is there a way of taking control of what filename we want to save the file
as in the word 03?
For example, in a letter template, we have a Subject field as a DOCVARIABLE.
When user go to save as and the Save As dialog box pops up, we like it to
take the value of the Subject from the Subject field as the file name (rather
than whatever comes up in the first line or paragraph, which word document
usually does by default).
I have the following code as follows
Private Sub Document_Close()
ActiveDocument.SaveAs
FileName:=ActiveDocument.Variables("subject").Value,
fileformat:=wdFormatDocument
End Sub
There is no such object like "SaveAs" for Document. Hence, i used
Document_Close instead. However, the problem with this is it automatically
save the file with the Subject as the filename and close immediately without
letting user to browse for where to park the file.
Your help would be greatly appreciated.
Thank you in advance
Is there a way of taking control of what filename we want to save the file
as in the word 03?
For example, in a letter template, we have a Subject field as a DOCVARIABLE.
When user go to save as and the Save As dialog box pops up, we like it to
take the value of the Subject from the Subject field as the file name (rather
than whatever comes up in the first line or paragraph, which word document
usually does by default).
I have the following code as follows
Private Sub Document_Close()
ActiveDocument.SaveAs
FileName:=ActiveDocument.Variables("subject").Value,
fileformat:=wdFormatDocument
End Sub
There is no such object like "SaveAs" for Document. Hence, i used
Document_Close instead. However, the problem with this is it automatically
save the file with the Subject as the filename and close immediately without
letting user to browse for where to park the file.
Your help would be greatly appreciated.
Thank you in advance