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?
Jonathan West - 21 Jul 2005 16:01 GMT
There is a Delete method that applies to a CustomDocumentProperty object.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
> Hi everyone,
>
[quoted text clipped - 15 lines]
>
> Could anyone please tell me what I am doing wrong?