Consulting

Results 1 to 4 of 4

Thread: Outlook custom toolbar

  1. #1

    Outlook custom toolbar

    Hi,
    I am kind of new to VBA/Outlook coding, but I do have some general programming experience.
    I am trying to (programmatically) create a custom toolbar with a custom button in. But I can't get the button's .OnAction event to fire. I am doing everything as it says in several tutorials/guides, but it just doesn't work.

    I am using WindowsXP Pro / Office 2003

    Here is the code for your reference,

    Set btnNewCustom1 = _
    tlbCustomBar1.Controls.Add(Type:=msoControlButton)

    With btnNewCustom
    .Style = msoButtonIconAndCaption
    .Visible = True
    .OnAction = "click"
    End With

    Function click()
    MsgBox ("Message")
    End Function

  2. #2
    Who knows the solution,Please post solution,

    Thanks,

  3. #3
    VBAX Regular
    Joined
    Sep 2008
    Posts
    36
    Location
    You use the OnAction property to return or set the name of a VBA routine, such as "SlyBoots". Do you have a routine named "click"?

  4. #4
    Thanks for reply Sly. No, i don't have(but have a function, as shown in the example).Can you provide me a sample app for that.

Posting Permissions

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