For our administrative dept, I'm working on a simple document management tool that will save backup copies of Word files in a pre-determined path, if a user-property has been set.
Since Word doesn't have a Document.SaveCopyAs method, I have to first Save the current document, then SaveAs to the backup location.
The problem is that when the file hasn't been saved before, the Save method will show a standard 'PutFile' dialog -- which is good, but if the user clicks 'Cancel' in this dialog, VBA will throw a run-time error '4198' and point at the Document.Save line when I try to debug it.
Does anybody have an idea of how to avoid this error ?
TIA,
Jan Schenkel.
Since Word doesn't have a Document.SaveCopyAs method, I have to first Save the current document, then SaveAs to the backup location.
The problem is that when the file hasn't been saved before, the Save method will show a standard 'PutFile' dialog -- which is good, but if the user clicks 'Cancel' in this dialog, VBA will throw a run-time error '4198' and point at the Document.Save line when I try to debug it.
Does anybody have an idea of how to avoid this error ?
TIA,
Jan Schenkel.