There is also a Delete method. Try something like the following:
Dim DocProps As Office.DocumentProperties
Dim DocProp As Office.DocumentProperty
Set DocProps = ThisWorkbook.CustomDocumentProperties
Set DocProp = DocProps("MyProp") ' Here it is.
Debug.Print DocProp.Value
DocProps.Item("MyProp").Delete ' Now it's gone
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
On Wed, 22 Oct 2008 14:08:26 -0700 (PDT), JAC <(E-Mail Removed)>
wrote:
>Does anyone know how to remove a specified Custom Document Property
>from an Excel workbook using VBA?
>Adding is easy. There is a method to Add.
>
>I tried to use the Macro Recorder while trying to delete a property
>manually, but it did not record anything useful.
>Thank you in anticipation.