deleting CustomDocumentProperties

M

Medes

Hi,

I am trying to delete CustomDocumentProperties but by using following code:

object[] TheArgs = new object[] { PropName, false,
MsoDocProperties.msoPropertyTypeString, PropValue };

TypeOfAllCustomProps.InvokeMember("Delete", BindingFlags.Default |
BindingFlags.InvokeMethod, null, AllCustomProps, TheArgs);

I get this error:
System.Runtime.InteropSerive.COMException (0X80020006): Unknown name.
(Exception from HRESULT: .....
at Sytem.RuntimeType.InvokeDispMethod(string name, BindingFlags
invokeAttr,....


somewhere i saw that you can use CustomDocumentProperties.Remove.
But it is not right.

thank you for your help
 

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