A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to call a procedure from a custom command bar in Outlook 2007



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old March 7th 10, 07:42 AM posted to microsoft.public.outlook.program_addins
Sqt Waddle
external usenet poster
 
Posts: 1
Default How to call a procedure from a custom command bar in Outlook 2007

Hello and TIA for your assistance,

I am trying to convert VBA code in OL07 to an Add-in in VB6.

The Add-in creates a custom command bar with three buttons and fires code
when a new inspector is created.

When I load the add-in the command bar appears, the new inspector code fires
and the add-in disconnects on exit.

However, I cannot get the onaction event for the command bar buttons to fire.

The code that creates the button is:
Set custBar = Application.ActiveExplorer.CommandBars.Add(Name:=" Show",
Position:=msoBarTop, Temporary:=True)
custBar.Visible = True


Set Cusbutton = custBar.Controls.Add(Type:=msoControlButton)
With Application.ActiveExplorer.CommandBars("Show").Con trols(1)
.Style = msoButtonCaption
.Caption = "My Stuff"
.OnAction = "RunMyStuff"
.ToolTipText = "My Stuff"
.BeginGroup = True
.Tag = "Test Tag"
End With

Where should I place Sun RunMyStuff so that it will fire when the button is
clicked?

Thanks,
 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook custom form - VBS call VBA macro JMat45 Outlook - Using Forms 3 February 1st 10 03:22 AM
Custom VBA forms in Outlook--how to call w/macro? Sharon Wright Outlook - Using Forms 1 June 9th 09 06:46 PM
How to create and call Microsoft Custom Form in Outlook 2003 Mail? Naval kishore Outlook - Using Forms 1 May 8th 08 01:53 PM
OH YES I THINK THEY DID CALL MR BUT I DID NOT TALK TO THEM MY MAMA SAI CALL HER BACK LATER CUZ SHE IS DOING SOMETHG RIGHT NOW WHY DID YOU CALL ME NO THEIR IS ONLY ONE ME YES SIR Outlook Express 0 February 25th 07 08:12 AM
How do I call a stored procedure inside my sql with a vba script? Computer Newbie Outlook and VBA 1 March 14th 06 07:08 AM


All times are GMT +1. The time now is 09:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.