About CustomDocumentProperties

M

Mirka

Hi everyone,

Does anyone know if there is a command in VBA that removes a
CustomDocumentProperty? I found a reference in MSDN library about adding a
CustomDocumentProperty but not about removing it as well.

I noticed also that if a property is added manually -that means I go
file->properties->custom- then I can write in my macro
ActiveDocument.CustomDocumentProperties(index).Delete and it is removed. But
if the property is added by my code with a command like this:
ActiveDocument.CustomDocumentProperties.Add xNode.ParentNode.nodeName, False,
msoPropertyTypeString, xNode.NodeValue and then it gets a value with the
command:
ActiveDocument.CustomDocumentProperties.Item(xNode.ParentNode.nodeName).Value
= xNode.NodeValue then I cannot remove this property.

Could anyone please tell me what I am doing wrong?
 

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