J
Jenny
Hi,
I would like to create a Macro (based on the one below) to change the file
name of a document via a prompt if the user chooses to close the document via
the X (Close Window) or if the user chooses Alt+F4.
What would be the appropriate name for the subroutine for this Macro?
Thanks.
Sub FileSave()
' Override for standard save command
If ActiveDocument.Path <> "" Then ' file has been saved before
ActiveDocument.Save
Else
Dim strJobNumber As String
strJobNumber = InputBox("Enter Job Number")
With Application.Dialogs(wdDialogFileSaveAs)
.Name = strJobNumber & " FM-DM-049-o1 agenda.doc"
.Show
End With
End If
End Sub
I would like to create a Macro (based on the one below) to change the file
name of a document via a prompt if the user chooses to close the document via
the X (Close Window) or if the user chooses Alt+F4.
What would be the appropriate name for the subroutine for this Macro?
Thanks.
Sub FileSave()
' Override for standard save command
If ActiveDocument.Path <> "" Then ' file has been saved before
ActiveDocument.Save
Else
Dim strJobNumber As String
strJobNumber = InputBox("Enter Job Number")
With Application.Dialogs(wdDialogFileSaveAs)
.Name = strJobNumber & " FM-DM-049-o1 agenda.doc"
.Show
End With
End If
End Sub