Results 1 to 7 of 7
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Combo Box for Categories (2003)

    As new to Outlook programming- How do I create a combo box on a custom form to list all my categories?
    Thanks

    I did a google but did not find anything very useful

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

    Re: Combo Box for Categories (2003)

    The master category list is not exposed in Outlook VBA. It is a binary value stored in the Windows Registry (for Outlook 2002 and up). See this newsgroup thread for sample code. For Outlook 2003, you must use

    HKEY_CURRENT_USERSoftwareMic

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Combo Box for Categories (2003)

    Well without really understanding API calls, i was able to get a semicolon list of all the categories out of the function, by changing the output of the function from a Boolean to a String . Now I just need to use it as the rowsource for the combo box. Can you use a function as a row source for a combo box in an Outlook Form?
    As usual Thanks Hans

    Zave

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

    Re: Combo Box for Categories (2003)

    You will have to use the Split function to create an array from the semicolon-separated list, then loop through the array items and use the AddItem method of the list box to add items one by one.

  5. #5
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Combo Box for Categories (2003)

    Sounds like fun <img src=/S/confused3.gif border=0 alt=confused3 width=45 height=45> , but we will persevere <img src=/S/exclamation.gif border=0 alt=exclamation width=15 height=15>

    Is there an OnOpen event that you can use to do that? (As I said I am new to Outlook)

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

    Re: Combo Box for Categories (2003)

    Is this an Outlook form? I know nothing at all about those. If you're creating a userform (created in the Visual Basic Editor), you can use the Initialize event.

  7. #7
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Jerusalem, Israel
    Posts
    708
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Combo Box for Categories (2003)

    I am learning the difference between them. I think the effort is not worth it, except for the learning experience. I will just hard code 3 categories into a combo box.

Posting Permissions

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