It would be objContactsButton_Click(). Just select that button object
in the left hand drop down and the Click event should be added to your
code automatically.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Christoph" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a problem with an outlook add-in and would be incredibly
happy
> if someone can help me.
>
> Here the VB code:
> ...
> Dim WithEvents objContactsButton As Office.CommandBarButton
> Dim objBar As Office.CommandBar
>
> --> At the InitHandler procedure:
>
> Set moOL = oApp
> Set moNS = oApp.GetNamespace("MAPI")
> Set moActiveExplorer = moOL.ActiveExplorer
> msProgID = sProgID --> parameter of this sub
> Call PropertiesButton
>
> Public Sub PropertiesButton()
>
> Set objBar = moActiveExplorer.CommandBars("Standard")
> Set objContactsButton = objBar.FindControl(Tag:="Kontakte")
> If objContactsButton Is Nothing Then
> Set objContactsButton =
objBar.Controls.Add(msoControlButton)
> With objContactsButton
> .Caption = "Gemeinsame Kontakte"
> .Tag = "Kontakte"
> .ToolTipText = "Einstellungen für gemeinsam genutzte
> Kontakte"
> .OnAction = "<!" & msProgID & ">"
> End With
> objContactsButton.Execute
> End If
>
> End Sub
>
>
> So now I would like to know the procedure-name for the click event,
> where I want to open an own form window?