function onConnection( object application ... )
{
Outlook.Application _outlookApplication = (Outlook.Application) application;
_outlookApplication.ItemSend += ... (ProcessBeforeSend);
}
public void ProcessBeforeSend(object Item ... )
{
Outlook.MailItem mail = (Outloook.MailItem) Item;
// here is the code to read mail header ,and the body and then call web
service that save mail, with attachments into the database.
}
Is that what you are looking for?
"Ken Slovak - [MVP - Outlook]" wrote:
You're only showing your OnConnection code, how are you instantiating the
mail item and how are you trying to read 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
"Amit" wrote in message
...
Thank you Ken.
Your reply has almost gave me the answer. However, I am still not
confident
on what you've said about disabling security prompts with objects.
I am currrently using the shared-add-ins template project, provided by
Microsoft Visual Studio 2005 that generates line of code to connects with
the
Outlook:
[GuidAttribute("DE8C31FA-3401-4EB5-955A-F74390256D3E"),
ProgId("MyAddin1.Connect")]
public class Connect : Object, Extensibility.IDTExtensibility2
{
/// summary
public void OnConnection(object application, Extensibility.ext_ConnectMode
connectMode, object addInInst, ref System.Array custom)
{
applicationObject = application;
addInInstance = addInInst;
}
---
but if I would install this add-in and try to read mail item , it is
giving
me security prompt.
I think your point is not triggering on what you are trying to refer
Please advise with some sample (if possible).
Thank you once again.
Am