Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a Custom Property

Status
Not open for further replies.

scking

Programmer
Jan 8, 2001
1,263
US
I want to create a custom property in Excel. At one time I saw the snippet of code that performed that but can't find it again. The help file is totally inadequate, just telling me how to get the value of a custom property but not how to create it.

Retrieve the value:
CustomDocumentProperties.Item("Complete")

I verify the column titles and formats and would like to have a user property where I could store the results.

Growth follows a healthy professional curiosity
 
Can you develop this, taken from XL2002 help.
Code:
With ActiveDocument.CustomDocumentProperties
    .Add Name:="CustomNumber", _
        LinkToContent:=False, _
        Type:=msoPropertyTypeNumber, _
        Value:=1000
    .Add Name:="CustomString", _
        LinkToContent:=False, _
        Type:=msoPropertyTypeString, _
        Value:="This is a custom property."
    .Add Name:="CustomDate", _
        LinkToContent:=False, _
        Type:=msoPropertyTypeDate, _
        Value:=Date
End With

AC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top