Part III
Read the Introduction about this article Part I
Read about reading the summary properties of word document in this article Part II
In this post, we can see what is the code for the reading the custom properties of the word document.
In this post, we can see what is the code for the reading the custom properties of the word document.
public static void GetDocumentCustomProperties(string filename) { OleDocumentPropertiesClass doc = new OleDocumentPropertiesClass(); doc.Open(filename, true, dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess); //Reading and writing the custom properties to a file StreamWriter sw1= new StreamWriter(@"D:\FileRead_Custom.txt"); CustomProperties obj_CustomProp = doc.CustomProperties; foreach (CustomProperty custom_prop in obj_CustomProp ) { sw1.WriteLine(custom_prop.Name " " custom_prop.get_Value()); } sw1.Close(); doc.Close(false); }
Hope this helps you!
Did you try this with word 2013 ?
ReplyDeleteIt seems dso cannot read from word 2013 custom properties.
Any help on this is really appreciable.