We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Accessing Document Properties

Thread ID:





48770 Sep 4,2006 02:53 PM UTC Sep 5,2006 01:58 PM UTC WinForms 3
Tags: DocIO
Owen Morgan-Jones
Asked On September 4, 2006 02:53 PM UTC


We have been evaluating the Essential DocIO tool and would like to use it to access information stored in Word Document Custom Property fields. Some support for this is clearly present through the use of the WordReader.CustomDocumentProperties collection, but I have been unable to find any documentation of this property''s use.

How would I go about accessing a custom document property called "MyField"? I have tried using reader.CustomDocumentProperties["MyField"], but this throws an exception.

Any help would be much appreciated.



Administrator [Syncfusion]
Replied On September 4, 2006 07:10 PM UTC

Hi Owen,

Thank you for evaluating Essential DocIO.

I was not able to reproduce the problem. It was working fine for me. You can access the custom properties from document by enumerating through the document.CustomDocumentProperties property and access the custom properties one by one by its index value. Also you can access the custom properties by its name.

I have created a small sample for accessing the document properties from the document. Please take a look at it and let me know if it meets your need.

Here is the code snippet to accessing the custom properties from document.


for (int i = 0; i < Document.CustomDocumentProperties.Count; i++ )
Cus_Properties.Add( document.CustomDocumentProperties[i].ToString());



Owen Morgan-Jones
Replied On September 5, 2006 09:57 AM UTC

Hi Prabhu,

Thanks for your swift reply. I tried the code snippet above, but it did not compile, and gave these error messages:

1) The best overloaded method match for ''Syncfusion.DocIO.DLS.CustomDocumentProperties.this[string]'' has some invalid arguments

2) Argument ''1'': cannot convert from ''int'' to ''string''

These were both caused by the line in the body of the for-loop.

This is typical of the problem I am having. I can see in the debugger''s watch that the document properties are held within the CustomDocumentProperties property, but am unable to access them through code, either with an index integer or a the property name as a string.



Administrator [Syncfusion]
Replied On September 5, 2006 01:58 PM UTC

Hi Owen,

Sorry for the inconvenience caused.

This issue was identifided internally and we have been fixed it. The sample was working fine in our latest internal assemblies. Could you please create a Direct – Trac incident by mentioning the forum ID for reference and I will send you the preview version of latest internal assemblies for run this sample.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon