-
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
-
Who knows the solution,Please post solution,
Thanks,
-
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"?
-
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
-
Forum Rules