1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
Public Class MailManagement
Dim selectExplorers As Outlook.Explorers
Dim Inspectors As Outlook.Inspectors
Public MonInspect As Outlook.Inspectors
Dim cb As Office.CommandBar
Dim menuPopup As Office.CommandBarPopup
Dim premierBouton As Office.CommandBarButton
Sub inspectors_NewInspector(ByVal Inspector As Microsoft.Office.Interop.Outlook.Inspector)
cb = Inspector.CommandBars.Add("mabarre", Office.MsoBarPosition.msoBarTop, False, True)
cb.Visible = True
cb.Protection = Microsoft.Office.Core.MsoBarProtection.msoBarNoCustomize
menuPopup = cb.Controls.Add(Office.MsoControlType.msoControlPopup, , , , True)
menuPopup.Caption = "Mails Types"
menuPopup.Tag = "Mails Types"
'btn = cb.Controls.Add
'btn.Caption = "My Button"
'btn.Tag = "My Button"
Dim bouton_1 As Office.CommandBarButton
bouton_1 = CType(menuPopup.Controls.Add(1), _
Office.CommandBarButton)
With bouton_1
.Style = Office.MsoButtonStyle.msoButtonCaption
.Caption = "menu1"
.Tag = "boutonUn"
End With
If Me.premierBouton Is Nothing Then
Me.premierBouton = bouton_1
AddHandler premierBouton.Click, AddressOf premierBouton_Click
Else
End If
End Sub
Private Sub premierBouton_Click()
CreateMailItem()
End Sub
End Class |
Partager