S
Sandeep Sharma
Hi,
While using Word 2003 with c# code, I can get value of a
particular document property say author as follow:
object oDocBuiltInProps;
###################
oDocBuiltInProps = aDoc.BuiltInDocumentProperties;
Type typeDocBuiltInProps = oDocBuiltInProps.GetType();
//Display some built-in property - say Author,
string strIndex = "Author";
string strValue = "";
object oDocProp = typeDocBuiltInProps.InvokeMember("Item",
BindingFlags.Default | BindingFlags.GetProperty,
null,
oDocBuiltInProps,
new object[]{strIndex});
Type typeDocProp = oDocProp.GetType();
strValue = typeDocProp.InvokeMember("Value",
BindingFlags.Default | BindingFlags.GetProperty,
null,
oDocProp,
new object[]{}).ToString();
MessageBox.Show("Author of the document is: " + strValue);
##############
But I dont understand how to enumerate all document
properties. I want to list down all my
customDocumentProperties and update a few of them.
Pls help.
Thx.
Sandeep
While using Word 2003 with c# code, I can get value of a
particular document property say author as follow:
object oDocBuiltInProps;
###################
oDocBuiltInProps = aDoc.BuiltInDocumentProperties;
Type typeDocBuiltInProps = oDocBuiltInProps.GetType();
//Display some built-in property - say Author,
string strIndex = "Author";
string strValue = "";
object oDocProp = typeDocBuiltInProps.InvokeMember("Item",
BindingFlags.Default | BindingFlags.GetProperty,
null,
oDocBuiltInProps,
new object[]{strIndex});
Type typeDocProp = oDocProp.GetType();
strValue = typeDocProp.InvokeMember("Value",
BindingFlags.Default | BindingFlags.GetProperty,
null,
oDocProp,
new object[]{}).ToString();
MessageBox.Show("Author of the document is: " + strValue);
##############
But I dont understand how to enumerate all document
properties. I want to list down all my
customDocumentProperties and update a few of them.
Pls help.
Thx.
Sandeep