![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi,
I have the following code in my app if (this.Application.ActiveExplorer().Selection.Count 0) { Object selObject = this.Application.ActiveExplorer().Selection[1]; if (selObject is Outlook.MailItem) { Outlook.MailItem mailItem = (selObject as Outlook.MailItem); XXXXXXXXXXXXXXXXXXXXXX } } At the place XXXXXXXXXXXXXXXXXXXXXX I want to know whether New button on the standard toolbar is clicked or not. I want to do some calculations if New button is clicked. Can anyone show me how to this in C# outlook plugin code? Thanks -- Nagaraj Tadipatri |
#2
|
|||
|
|||
![]()
When New is clicked a new item is opened, which would fire the
Inspectors.NewInspector() event. You need to subscribe to that event to know when that button is clicked. As an alternative you can also get that control as a CommandBarButton object in the "Standard" CommandBar and subscribe to the control's Click() event. In that case you know it was clicked but that's it. You don't get a handle to whatever was created. So using both events may be what you need to do depending on exactly what you want. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Nagaraj" wrote in message ... Hi, I have the following code in my app if (this.Application.ActiveExplorer().Selection.Count 0) { Object selObject = this.Application.ActiveExplorer().Selection[1]; if (selObject is Outlook.MailItem) { Outlook.MailItem mailItem = (selObject as Outlook.MailItem); XXXXXXXXXXXXXXXXXXXXXX } } At the place XXXXXXXXXXXXXXXXXXXXXX I want to know whether New button on the standard toolbar is clicked or not. I want to do some calculations if New button is clicked. Can anyone show me how to this in C# outlook plugin code? Thanks -- Nagaraj Tadipatri |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to know which button clicked | Nagaraj | Add-ins for Outlook | 3 | May 27th 09 03:07 PM |
How do I show Contact subfolders when email To: button is clicked | Leonard | Outlook - Using Contacts | 1 | September 11th 08 09:44 PM |
Ribbon - Get position from clicked button | Christian Havel | Add-ins for Outlook | 2 | July 12th 07 08:20 AM |
Recipient addresses are removed from the To: box when send button clicked | brodden | Outlook - General Queries | 1 | August 23rd 06 02:11 PM |
"Accept Proposal" button is dimmed/unable to be clicked on a calendar entry | [email protected] | Outlook - General Queries | 0 | July 20th 06 08:34 PM |