M
Marc Waesche
Hi!
I use this script (see below) to add a button to the outlook inspector. Now
I want to open a sup menu when that button is pressed. How can I do that?
Best regards,
Marc
Private Sub Form_Load()
Dim oApp As Object
Dim objIns As Object
Dim objCBar As Object
Dim lpobjButton As Object
'CREATE AN INSTANCE OF THE OUTLOOK APPLICATION OBJECT
Set oApp = CreateObject("Outlook.Application")
'Set objIns = oApp.ActiveInspector
Set objIns = oApp.ActiveExplorer
Set objCBar = objIns.CommandBars
'CREATE THE ACTUAL BUTTON IN OUTLOOK
Set lpobjButton = objCBar.Item("Standard").Controls.Add()
lpobjButton.Caption = "SmilingMails"
'ENABLE THE BUTTON TO CALL ANOTHER EVENT
lpobjButton.HyperlinkType = 1
lpobjButton.ToolTipText = "SmilingMails"
Set lpobjButton = Nothing
Set oApp = Nothing
End
End Sub
I use this script (see below) to add a button to the outlook inspector. Now
I want to open a sup menu when that button is pressed. How can I do that?
Best regards,
Marc
Private Sub Form_Load()
Dim oApp As Object
Dim objIns As Object
Dim objCBar As Object
Dim lpobjButton As Object
'CREATE AN INSTANCE OF THE OUTLOOK APPLICATION OBJECT
Set oApp = CreateObject("Outlook.Application")
'Set objIns = oApp.ActiveInspector
Set objIns = oApp.ActiveExplorer
Set objCBar = objIns.CommandBars
'CREATE THE ACTUAL BUTTON IN OUTLOOK
Set lpobjButton = objCBar.Item("Standard").Controls.Add()
lpobjButton.Caption = "SmilingMails"
'ENABLE THE BUTTON TO CALL ANOTHER EVENT
lpobjButton.HyperlinkType = 1
lpobjButton.ToolTipText = "SmilingMails"
Set lpobjButton = Nothing
Set oApp = Nothing
End
End Sub