![]() |
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 want to override the 'To' button click event in Outlook so that user can select a right contact from the list of contact in the organisation other than the contacts stored in Outlook. Can any one tell me if we can override the 'To' button click event using VB so that it would do what we want? If so then how? Many thnaks! Zengfu Xu -- Software Developer Office Automation |
Ads |
#2
|
|||
|
|||
![]()
No. That dialog opening event isn't exposed anywhere. You'd have to use
Win32 API calls and callbacks to handle the dialog window opening and send it a WM_CLOSE message, then you'd have to provide your own dialog in its place. You could handle the PropertyChange() event on the item to trap when a selection is made from the To dialog, but that would be after the fact. You don't say what version of Outlook you're working with (always do that), but the Outlook 2007 object model has a NameSpace method GetSelectNamesDialog() that is the To, etc. dialog. That can be customized and set up as you like, but to know when To was clicked you'd still need what I said in the first paragraph of my answer. There's nothing equivalent in the earlier Outlook object models. although CDO 1.21 does provide a Session.AddressBook() function that's roughly equivalent to the Outlook 2007 GetSelectNamesDialog() method. Please do not multipost. -- 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 "Zengfu Xu" wrote in message news ![]() Hi, I want to override the 'To' button click event in Outlook so that user can select a right contact from the list of contact in the organisation other than the contacts stored in Outlook. Can any one tell me if we can override the 'To' button click event using VB so that it would do what we want? If so then how? Many thnaks! Zengfu Xu -- Software Developer Office Automation |
#3
|
|||
|
|||
![]()
Hi Ken,
Thank you very much for your help. I can use WM_CLOSE message to close the To dialog screen. But how can I use the Win32 API calls and callbacks to handle the 'To' dialog window ("Select Names") opening? Our clients use both Outlook 2003 and Outlook 2007. We do like to provide our own dialog screen for the contact list otherthan Outlook's address book. Many thanks Zengfu Xu -- Software Developer Office Automation "Ken Slovak - [MVP - Outlook]" wrote: No. That dialog opening event isn't exposed anywhere. You'd have to use Win32 API calls and callbacks to handle the dialog window opening and send it a WM_CLOSE message, then you'd have to provide your own dialog in its place. You could handle the PropertyChange() event on the item to trap when a selection is made from the To dialog, but that would be after the fact. You don't say what version of Outlook you're working with (always do that), but the Outlook 2007 object model has a NameSpace method GetSelectNamesDialog() that is the To, etc. dialog. That can be customized and set up as you like, but to know when To was clicked you'd still need what I said in the first paragraph of my answer. There's nothing equivalent in the earlier Outlook object models. although CDO 1.21 does provide a Session.AddressBook() function that's roughly equivalent to the Outlook 2007 GetSelectNamesDialog() method. Please do not multipost. -- 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 "Zengfu Xu" wrote in message news ![]() Hi, I want to override the 'To' button click event in Outlook so that user can select a right contact from the list of contact in the organisation other than the contacts stored in Outlook. Can any one tell me if we can override the 'To' button click event using VB so that it would do what we want? If so then how? Many thnaks! Zengfu Xu -- Software Developer Office Automation |
#4
|
|||
|
|||
![]()
Once you know the window hWnd for that dialog you can close it, to respond
to it opening would require handling all Windows messages looking for creation of that window (the select names dialog). You'd close that and open your own dialog. Whether that dialog was an ATL form template or a Windows Form or whatever in whatever language you're using. Since you'd be creating that dialog from scratch you would be able to handle its appearance and its return value. It's not going to be easy or simple, and you'll have to work out most of the details yourself. -- 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 "Zengfu Xu" wrote in message ... Hi Ken, Thank you very much for your help. I can use WM_CLOSE message to close the To dialog screen. But how can I use the Win32 API calls and callbacks to handle the 'To' dialog window ("Select Names") opening? Our clients use both Outlook 2003 and Outlook 2007. We do like to provide our own dialog screen for the contact list otherthan Outlook's address book. Many thanks Zengfu Xu -- Software Developer Office Automation |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
adding button like encryption and signing information button | Ramazan | Add-ins for Outlook | 2 | October 7th 08 02:57 PM |
Outlook send button | nabsnabs | Outlook - Using Contacts | 1 | August 21st 08 05:51 PM |
Outlook Office Button | ronnieg56 | Outlook - General Queries | 3 | October 7th 07 03:11 AM |
Button location in button bar | Leah Ann | Add-ins for Outlook | 1 | August 11th 06 03:16 PM |
Outlook Button | adubb | Outlook - Using Forms | 0 | April 13th 06 08:31 PM |