Results 1 to 2 of 2
  1. #1
    3 Star Lounger MacroAlan's Avatar
    Join Date
    Feb 2003
    Location
    St Louis, Missouri, USA
    Posts
    254
    Thanks
    6
    Thanked 1 Time in 1 Post

    CustomDocumentProperties (VBA/Excel/XP)

    Is there a way to insert a new Custom Document Property into a spreadsheet if it does not already exist?

    I am applying properties to new spreadsheets in the creation process.
    Alan

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: CustomDocumentProperties (VBA/Excel/XP)

    Use the Add method of CustomDocumentProperties:

    Dim wbk As Workbook
    Set wbk = ...
    wbk.CustomDocumentProperties.add "TestProperty", False, msoPropertyTypeString, "MacroAlan"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •