Jamie Garroch (MVP)
asked on
Can I delete the entire data item in an Office document .ContentTypeProperties with VBA?
I can use the .ContentTypeProperties collection to inspect and clear any data values in a document but I need to be able to delete the named item too. I believe this collection is being created by SharePoint.
It appears that the built-in Office document inspector (File / Info / Check for Issues / Inspect XYZ) is able to delete the entire data (I believe listed as "Document server properties" in the Inspector).
Is there a way to do the same with VBA?
There appears to be no .Delete method as in these test examples:
It appears that the built-in Office document inspector (File / Info / Check for Issues / Inspect XYZ) is able to delete the entire data (I believe listed as "Document server properties" in the Inspector).
Is there a way to do the same with VBA?
There appears to be no .Delete method as in these test examples:
' PowerPoint
ActivePresentation.ContentTypeProperties(1).Delete
' Excel
ActiveWorkbook.CustomDocumentProperties(1).Delete
' Word
ActiveDocument.CustomDocumentProperties(1).Delete
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
PJJ - nice link :0
Jamie,
thanks for the feedback. i am glad you find a solution that worked for you.
thanks for the feedback. i am glad you find a solution that worked for you.
DrTribos
thanks :-)
thanks :-)
ASKER
This is what works for me in PowerPoint:
ActivePresentation.RemoveD