G
greba
I've followed the instructions on http://msdn2.microsoft.com/en-us/library/aa338203.aspx
and I can get the sample to work, however when I try and extend it to
reading document properties of the document it doesn't work.
If I have the following piece of code in either my Inspect or Fix
functions (from the IDocumentInspector interface), then the variable
docProps is null. Doc is the first argument passed into the function.
Microsoft.Office.Core.DocumentProperties docProps =
((Microsoft.Office.Interop.Word._Document)Doc).CustomDocumentProperties
as Microsoft.Office.Core.DocumentProperties;
The same piece of code in a different C# add-in sets docProps to a non-
null value, and allows access to the document's custom properties.
What am I doing wrong?
Thanks for the help.
and I can get the sample to work, however when I try and extend it to
reading document properties of the document it doesn't work.
If I have the following piece of code in either my Inspect or Fix
functions (from the IDocumentInspector interface), then the variable
docProps is null. Doc is the first argument passed into the function.
Microsoft.Office.Core.DocumentProperties docProps =
((Microsoft.Office.Interop.Word._Document)Doc).CustomDocumentProperties
as Microsoft.Office.Core.DocumentProperties;
The same piece of code in a different C# add-in sets docProps to a non-
null value, and allows access to the document's custom properties.
What am I doing wrong?
Thanks for the help.