Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2005

Tip: Looking for answers? Try searching our database.

About CustomDocumentProperties

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mirka - 21 Jul 2005 14:57 GMT
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?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.