christer99
IS-IT--Management
- Dec 3, 2001
- 247
I have a Visual Basic program that copies/merges word document. However, some of the source documents are protected and I am getting this error:
System.Runtime.InteropServices.COMException (0x800A11FD): This method or property is not available because the document is a protected document.
at Microsoft.Office.Interop.Word.PageSetup.set_SectionStart(WdSectionStart prop)
at WindowsApplication8.Form1.CopyDocuments(String& docname, Int64 startpage, Int64 EndPage, Int64 DestPage, Int32 InsertPageBreak, Int32 vfAddon) in ...
I know I can use a try/catch statement, but how can I detect this specific error (protected documented). The COMException can be caused by a lot of things, and I want to be able to tell the end user that the source document is protected.
System.Runtime.InteropServices.COMException (0x800A11FD): This method or property is not available because the document is a protected document.
at Microsoft.Office.Interop.Word.PageSetup.set_SectionStart(WdSectionStart prop)
at WindowsApplication8.Form1.CopyDocuments(String& docname, Int64 startpage, Int64 EndPage, Int64 DestPage, Int32 InsertPageBreak, Int32 vfAddon) in ...
I know I can use a try/catch statement, but how can I detect this specific error (protected documented). The COMException can be caused by a lot of things, and I want to be able to tell the end user that the source document is protected.