CustomDocumentProperties help!!

M

mjcast

I am using the Microsoft Word 10.0 Object library. And i am tryin to access the CustomDocumentPropterties.

Microsoft.Office.Core.DocumentProperty prp;
Microsoft.Office.Core.DocumentProperties prps =
(*.*.*.DocumentProperties)ExistingDocument.CustomDocumentProperties;

The above line throws an exception,
"Specified cast is not valid"

everything i have read says that CustomDocumentProperties are a collection of DocumentPropertys
why is this happening can i get some help?
 
C

Chango V.

Your code appears correct. You might, however, have mismatching type
libraries. You should use the primary interop assemblies (PIAs) for both
Word and Office. Make sure the ones your project references come from the
GAC.

// Chango V.

NOTE: This post is from an anti-spam, non-existent email address. For
further communication, please reply to the

mjcast said:
I am using the Microsoft Word 10.0 Object library. And i am tryin to
access the CustomDocumentPropterties.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top