Tim Haley said:
Anyone know of a way to access and display the custom
document properties in Excel?
Thanks ...
To iterate through all document properties and add them
to a list box
Dim dp As DocumentProperty
For Each dp In ActiveWorkbook.CustomDocumentProperties
ListBox1.AddItem dp.Name
Next dp
To create a new document property
Set dp = ActiveWorkbook.CustomDocumentProperties.Add(Name:="adpass",
LinkToContent:=False, _
Type:=msoPropertyTypeString, value:="")
To set an existing property
ActiveWorkbook.CustomDocumentProperties("adpass") = "Hello World"
To delete a document properties
Dim dp As DocumentProperty
For Each dp In ActiveWorkbook.CustomDocumentProperties
if dp.Name="adpass" then
dp.Delete
End If
Next dp
Keith