![]() |
How to know which button clicked
Hi, I selected one mailItem in the Inbox. I selected New button. How can I know programatically that I selected New button only. Can anyone suggest me? Thanks in advance -- Nagaraj Tadipatri |
How to know which button clicked
Handle Inspectors.NewInspector(), that event fires when you open a new item.
-- 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 selected one mailItem in the Inbox. I selected New button. How can I know programatically that I selected New button only. Can anyone suggest me? Thanks in advance -- Nagaraj Tadipatri |
How to know which button clicked
Thanks Ken.
I have the following code in Inspectors.NewInspector() 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); } } In the above code I want to know whether New button is clicked or not. How to do this? -- Nagaraj Tadipatri "Ken Slovak - [MVP - Outlook]" wrote: Handle Inspectors.NewInspector(), that event fires when you open a new item. -- 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 selected one mailItem in the Inbox. I selected New button. How can I know programatically that I selected New button only. Can anyone suggest me? Thanks in advance -- Nagaraj Tadipatri |
How to know which button clicked
Does it really matter if the user clicked New or used Actions, New Mail
Message or whatever? They all result in opening a new item. If Inspector.CurrentItem.EntryID is null it's a new item, if not then a previously existing item was opened. If that's really so important to you then you can get the New button (wherever it exists) as a CommandBarButton and set up to handle its Click() event. You'd drill down from Explorer.CommandBars to the Standard toolbar (CommandBar) and FindControl to locate the New CommandBarButton, then handle Click() on it. -- 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 ... Thanks Ken. I have the following code in Inspectors.NewInspector() 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); } } In the above code I want to know whether New button is clicked or not. How to do this? -- Nagaraj Tadipatri |
All times are GMT +1. The time now is 12:29 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com