PC Review


Reply
Thread Tools Rate Thread

Click event on a self made button

 
 
Christoph
Guest
Posts: n/a
 
      20th Oct 2003
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?
 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      21st Oct 2003
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?



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: return to first button click event after another button click event John W. Vinson Microsoft Access Form Coding 0 4th Dec 2009 07:10 AM
When user press F5 after a button click event, the click event fires again! Max2006 Microsoft ASP .NET 2 19th Sep 2007 06:37 AM
How to raise an event of button (click event) from textbox's onkeydown event? ABC Microsoft Dot NET Framework Forms 2 25th Jul 2006 11:19 AM
How to fire both event button click and textchanged when button is click and text is changed Amy Microsoft ASP .NET 0 1st Jun 2006 03:33 PM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge Microsoft ASP .NET 2 26th May 2004 12:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:29 AM.