![]() |
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
|
|||
|
|||
![]()
I have been charged with writing an Outlook add-in that would check
and possibly change certain messages upon receiving and sending emails. I pretty familiar with Map, but don't know a lot about programmable support for outlook itself. So, my questions a 1. Is this possible? (check and change messages upon receiving and sending) 2. What would be the best way to go about it? I'm a bit overwhelmed by the options out there... There are VBA/Ole/COM-ish type of things, Outlook Extension APIs, Outlook Api, Mapi Api, VS Shared addin, VSTO type of project? I imagine some of these are different orientations on essentially the objects, but I would like to not go down the wrong path. 3. Since prefer a c# approach, (c++ is also nice) I'm thinking of a VSTO addin. Any problems with this? 4. How do i get a hold of messages as they come in? Thanks in advance, J |
#2
|
|||
|
|||
![]()
ItemAdd on the Items collection of the Inbox would work unless 16 or more
messages came in at once. Item.Send for individual items or Application.ItemSend for a general approach to items being sent. Those are the event handlers to use. You can also use Application.NewMailEx to get a list of EntryID's for incoming items. VSTO can only be used with Outlook 2003 Professional or higher and Outlook 2007 (all SKU's), so what you have to support will determine if you can use VSTO at all. VSTO is also a real chore to deploy, with the scattered documentation, many hoops to go through and things to set up and making sure all the prerequisites are installed. ..NET code in general will have many more requirements for successful deployment than COM code (the correct framework and PIA's have to be installed by an admin for one thing). A shared addin using .NET code should really be shimmed to give it its own AppDomain, to isolate it from other shared addins. However the shim wizard currently does not work for Outlook 2007, if you need to support that. In general, I'd usually recommend if you need to support Outlook 2002 or 2000 that you forget .NET code. It can be done but there are many additional hoops to go through, such as having to custom modify the Outlook 2002 PIA's for use with Outlook 2000 (there are no Outlook 2000 PIA's). Also, .NET code can be significantly slower than pure COM code. Extended MAPI can only be programmed using C++ or Delphi and is not supported for .NET code. It has a longer learning curve than any other method but is of course much faster, since all other Outlook API's are wrappers for, or access, Extended MAPI under the hood. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "JahMic" wrote in message oups.com... I have been charged with writing an Outlook add-in that would check and possibly change certain messages upon receiving and sending emails. I pretty familiar with Map, but don't know a lot about programmable support for outlook itself. So, my questions a 1. Is this possible? (check and change messages upon receiving and sending) 2. What would be the best way to go about it? I'm a bit overwhelmed by the options out there... There are VBA/Ole/COM-ish type of things, Outlook Extension APIs, Outlook Api, Mapi Api, VS Shared addin, VSTO type of project? I imagine some of these are different orientations on essentially the objects, but I would like to not go down the wrong path. 3. Since prefer a c# approach, (c++ is also nice) I'm thinking of a VSTO addin. Any problems with this? 4. How do i get a hold of messages as they come in? Thanks in advance, J |
#3
|
|||
|
|||
![]()
Trying one more time...
Hi Ken, Thanks for the excellent sumary of options. I have am pretty comfortable with Com & Mapi, although I'm more of a c++ guy then a vb guy. Can you direct me to some good 'hello world' type of samples out there? Thanks, J On Feb 13, 12:42 am, "Ken Slovak - [MVP - Outlook]" wrote: ItemAdd on the Items collection of the Inbox would work unless 16 or more messages came in at once. Item.Send for individual items or Application.ItemSend for a general approach to items being sent. Those are the event handlers to use. You can also use Application.NewMailEx to get a list of EntryID's for incoming items. VSTO can only be used with Outlook 2003 Professional or higher and Outlook 2007 (all SKU's), so what you have to support will determine if you can use VSTO at all. VSTO is also a real chore to deploy, with the scattered documentation, many hoops to go through and things to set up and making sure all the prerequisites are installed. .NET code in general will have many more requirements for successful deployment than COM code (the correct framework and PIA's have to be installed by an admin for one thing). A shared addin using .NET code should really be shimmed to give it its own AppDomain, to isolate it from other shared addins. However the shim wizard currently does not work for Outlook 2007, if you need to support that. In general, I'd usually recommend if you need to support Outlook 2002 or 2000 that you forget .NET code. It can be done but there are many additional hoops to go through, such as having to custom modify the Outlook 2002 PIA's for use with Outlook 2000 (there are no Outlook 2000 PIA's). Also, .NET code can be significantly slower than pure COM code. Extended MAPI can only be programmed using C++ or Delphi and is not supported for .NET code. It has a longer learning curve than any other method but is of course much faster, since all other Outlook API's are wrappers for, or access, Extended MAPI under the hood. -- Ken Slovak [MVP - Outlook]http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm "JahMic" wrote in message oups.com... I have been charged with writing an Outlook add-in that would check and possibly change certain messages upon receiving and sending emails. I pretty familiar with Map, but don't know a lot about programmable support for outlook itself. So, my questions a 1. Is this possible? (check and change messages upon receiving and sending) 2. What would be the best way to go about it? I'm a bit overwhelmed by the options out there... There are VBA/Ole/COM-ish type of things, Outlook Extension APIs, Outlook Api, Mapi Api, VS Shared addin, VSTO type of project? I imagine some of these are different orientations on essentially the objects, but I would like to not go down the wrong path. 3. Since prefer a c# approach, (c++ is also nice) I'm thinking of a VSTO addin. Any problems with this? 4. How do i get a hold of messages as they come in? Thanks in advance, J- Hide quoted text - |
#4
|
|||
|
|||
![]()
Well, the MS KB has examples of Extended MAPI code, as does the Exchange
SDK. There's a newsgroup for MAPI, microsoft.public.win32.programmer.messaging, and a MAPI list, the MAPI-L list. You can also look at http://www.outlookcode.com/d/mapi.htm for more links and code samples. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "JahMic" wrote in message oups.com... Trying one more time... Hi Ken, Thanks for the excellent sumary of options. I have am pretty comfortable with Com & Mapi, although I'm more of a c++ guy then a vb guy. Can you direct me to some good 'hello world' type of samples out there? Thanks, J |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
messages received show incorrect time in time sent | admulley | Outlook - General Queries | 1 | October 10th 06 03:45 PM |
Slow down checking for new messages | Spin | Outlook - General Queries | 2 | April 12th 06 04:42 PM |
In Outlook 2003 how can I share a calender in real time | BoZz | Outlook - Calandaring | 13 | March 13th 06 05:06 PM |
Rule to delete messages not addressed to my real name: | me | Outlook Express | 1 | February 22nd 06 05:03 PM |
Appts. in Outlook calendar only show in real-time how do I change | Out West Cowgirl | Outlook - Calandaring | 0 | January 18th 06 03:31 AM |