M
matt101
Hello,
I posted yesterday requiring help creating a backup procedure to which
Suzanne S. Barnhill pointed me in the right direction - thank you!
Now I have two questions on a macro I created which I think should be
addressed in a new post. I have copied the macro below, and wonder if
its possible to replace the inputbox with code which will automatically
save the document with the current date? Failing this, the 'cancel'
button on the inputbox window results in an error - could anyone help
me tidy this up?
Thank you
Sub SaveAs()
ChangeFileOpenDirectory _
"\\servername\folder name"
strDocName = InputBox("Enter document name.")
ActiveDocument.SaveAs FileName:=strDocName, _
FileFormat:=wdFormatDocument _
, LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False,
SaveAsAOCELetter:= _
False
End Sub
I posted yesterday requiring help creating a backup procedure to which
Suzanne S. Barnhill pointed me in the right direction - thank you!
Now I have two questions on a macro I created which I think should be
addressed in a new post. I have copied the macro below, and wonder if
its possible to replace the inputbox with code which will automatically
save the document with the current date? Failing this, the 'cancel'
button on the inputbox window results in an error - could anyone help
me tidy this up?
Thank you
Sub SaveAs()
ChangeFileOpenDirectory _
"\\servername\folder name"
strDocName = InputBox("Enter document name.")
ActiveDocument.SaveAs FileName:=strDocName, _
FileFormat:=wdFormatDocument _
, LockComments:=False, Password:="", AddToRecentFiles:=True, _
WritePassword:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False,
SaveAsAOCELetter:= _
False
End Sub