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

Commandbar Button Click Handler



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old August 7th 07, 07:19 PM posted to microsoft.public.outlook.program_addins
saturn
external usenet poster
 
Posts: 3
Default Commandbar Button Click Handler

Hi,

I am creating Outlook plug-in using ATL. I have to add a commandbar
(with a button) to only new mail items page. And on the click of that
button I have to execute certain set of code.

For this I have Advised for Outlook::InspectorsEvents on OnConnection.
When the corresponding function is called with new inspector, I checks
if the current item is new mail item.

If item is new mail item then I adds a commandbar and button to the
inspector and sets a bool variable so that I don't need to create it
again in the current session and I removes the commandbar on call to
OnDisconnect. At the same time, i Advise for click of this button
using Office::_CommandBarButtonEvents.

Now my commandbar and is visible whenever I open any new mail item.

All the thinks works fine if there is only one such open mail item and
any click on my button calls the corresponding function.

But if two or more such windows are open simultaneously then none
except the first opened inspector button clicks calls the correponding
function.

Have anyone else have faced any similar problem? What I am doing wrong
here? Any pointers on this will be of great help.

Regards,
Pradeep

 




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
Adding image to Outlook commandbar button saturn Add-ins for Outlook 3 August 3rd 07 02:13 PM
An event raise twice when click the button. David Add-ins for Outlook 0 July 16th 06 12:25 PM
click a button on the toolbar (via VBA?) Dan Outlook and VBA 7 May 2nd 06 09:35 AM
click a button on the toolbar (via VBA?) Dan Outlook - General Queries 2 May 1st 06 01:39 PM
how to add a custom button on the explorer "standard" commandbar Herve cadieu Outlook and VBA 1 March 17th 06 03:33 PM


All times are GMT +1. The time now is 09:00 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.