O2003 - Custom Form - Adding Category Button

Discussion in 'Microsoft Outlook Form Programming' started by srm, Dec 9, 2009.

  1. srm

    srm Guest

    I'm using O2003 and created a custom task form. I want to have access
    to my master Category list like I do on the main task form.

    I created a command button and used "cmdCategories" in the name field
    entered the code below. When I try to use the button, I get an invalid
    procedure or call in the "Set cmd" line.

    Sub cmdCategories_Click()
    Set ai = Item.Application.ActiveInspector
    Set mb = ai.CommandBars.Item("Menu Bar")
    Set cmd = mb.Controls("Edit").Controls("Categories...")
    cmd.Execute
    End Sub

    Any suggestions would be appreciated?

    Shawn
     
    srm, Dec 9, 2009
    #1
    1. Advertisements

  2. Use the TaskItem.ShowCategoriesDialog method:
    http://msdn.microsoft.com/en-us/library/aa210294.aspx

    --
    Sue Mosher, Outlook MVP
    Author of Microsoft Outlook 2007 Programming:
    Jumpstart for Power Users and Administrators
    http://www.outlookcode.com/article.aspx?id=54


    "srm" <> wrote in message
    news:...
    > I'm using O2003 and created a custom task form. I want to have access
    > to my master Category list like I do on the main task form.
    >
    > I created a command button and used "cmdCategories" in the name field
    > entered the code below. When I try to use the button, I get an invalid
    > procedure or call in the "Set cmd" line.
    >
    > Sub cmdCategories_Click()
    > Set ai = Item.Application.ActiveInspector
    > Set mb = ai.CommandBars.Item("Menu Bar")
    > Set cmd = mb.Controls("Edit").Controls("Categories...")
    > cmd.Execute
    > End Sub
    >
    > Any suggestions would be appreciated?
    >
    > Shawn
     
    Sue Mosher [MVP], Dec 9, 2009
    #2
    1. Advertisements

  3. srm

    srm Guest

    On Dec 9, 9:07 am, "Sue Mosher [MVP]" <> wrote:
    > Use the TaskItem.ShowCategoriesDialog method:http://msdn.microsoft.com/en-us/library/aa210294.aspx
    >
    > --
    > Sue Mosher, Outlook MVP
    >    Author of Microsoft Outlook 2007 Programming:
    >      Jumpstart for Power Users and Administrators
    >    http://www.outlookcode.com/article.aspx?id=54
    >
    > "srm" <> wrote in message
    >
    > news:...
    >
    > > I'm using O2003 and created a custom task form. I want to have access
    > > to my master Category list like I do on the main task form.

    >
    > > I created a command button and used "cmdCategories" in the name field
    > > entered the code below. When I try to use the button, I get an invalid
    > > procedure or call in the "Set cmd" line.

    >
    > > Sub cmdCategories_Click()
    > >   Set ai = Item.Application.ActiveInspector
    > >   Set mb = ai.CommandBars.Item("Menu Bar")
    > >   Set cmd = mb.Controls("Edit").Controls("Categories...")
    > >   cmd.Execute
    > > End Sub

    >
    > > Any suggestions would be appreciated?

    >
    > > Shawn


    Sue:

    Thank you.

    Shawn
     
    srm, Dec 10, 2009
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sue Mosher [MVP]

    Re: O2003 - Forms - Code/Script Editor problem

    Sue Mosher [MVP], Oct 3, 2003, in forum: Microsoft Outlook Form Programming
    Replies:
    2
    Views:
    1,298
    Sue Mosher [MVP]
    Oct 4, 2003
  2. Patrick Chouinard

    Outlook 2000 Custom forms used in O2003

    Patrick Chouinard, Oct 16, 2003, in forum: Microsoft Outlook Form Programming
    Replies:
    9
    Views:
    286
    Sue Mosher [MVP]
    Oct 29, 2003
  3. srm

    Forms and How They Work in O2003

    srm, Nov 1, 2003, in forum: Microsoft Outlook Form Programming
    Replies:
    1
    Views:
    137
    Sue Mosher [MVP]
    Nov 1, 2003
  4. Paul

    Category and Sub-Category in the Contact form

    Paul, Sep 17, 2004, in forum: Microsoft Outlook Form Programming
    Replies:
    1
    Views:
    273
    Sue Mosher [MVP-Outlook]
    Oct 2, 2004
  5. Kaido Kibin

    Custom forms displayed incorrectly when O2003 in cached mode

    Kaido Kibin, Oct 17, 2005, in forum: Microsoft Outlook Form Programming
    Replies:
    0
    Views:
    240
    Kaido Kibin
    Oct 17, 2005
Loading...

Share This Page