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:="")
This will work fine. Too bad Microsoft doesn't support
built-in Excel functions that access custom document
properties like Word field tags. Job security for those of
us who know how to progam in VB I suppose!
Tim
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.