When a Word document is opened in my Word Add-in, I validate the document. The validation requires the document to be saved so I call the save method:
Microsoft.Office.Tools.Word.Document.Save()
If the document is read-only, (my use case is opening an attached document from Outlook), the Save As dialog opens. If I save the document or hit cancel, a COMException is thrown for both cases with the message "This file is read-only. (File name.)".
Typically, a user cancellation COMException is thrown for Cancel and I would expect no exception to be thrown if the file is saved correctly. Is this a bug or do I need to handle the file differently?