Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using C# Addin (Office interop)

Status
Not open for further replies.

redav

Programmer
Mar 20, 2001
55
GB
Hi

I'm writing a addin to remove the custom properties within a word doc:-

The expample adds a custom property which works fine but what i need to do is then remove it (Remove does not work).

strIndex = "Test Custom";
strValue = "Test Value";
object[] oArgs = {strIndex,false,
MsoDocProperties.msoPropertyTypeString,
strValue};

Thanks
Redav
typeDocCustomProps.InvokeMember("Add", BindingFlags.Default |
BindingFlags.InvokeMethod, null,
oDocCustomProps, oArgs);


typeDocCustomProps.InvokeMember("Remove", BindingFlags.Default |
BindingFlags.InvokeMethod, null,
oDocCustomProps, oArgs);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top