while accessing "custom document property", invalid cast error.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I am trying for word 2000 automation with c#. There I want to get all custom document property of the document as follows:

Microsoft.Office.Core.DocumentProperties props = (Microsoft.Office.Core.DocumentProperties)aDoc.CustomDocumentProperties;
(where aDoc is active Word document).

But this gives me an Invalid Cast Exception.

I feel like using the correct syntax.
Pls help.

Thx.
Sandeep
 
Sandeep,

The following artilce will help you.

303296 HOWTO: Use Automation to Get and to Set Office Document Properties with
http://support.microsoft.com/?id=303296


Hope this helps!
Bharat Patel
Microsoft, Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.
 

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

Back
Top