Hi,
I have a requirement where i need to extract the contact which is
present as an attachment in the mail and save it into my Outlook.
Currently I am saving the attachment into TEMP folder. I do not know
how to put the that attachment in to my outlook
I am using C#.net for programming..
Here is the code :
void Application_NewMailEx(string EntryIDCollection)
{
object obj =
Application.Session.GetItemFromID(EntryIDCollection, Type.Missing);
if (obj is MailItem)
{
MailItem mi = obj as MailItem;
if (mi.Attachments.Count > 0)
{
foreach (Attachment a in mi.Attachments)
{
if (a.FileName.Contains(".msg"))
{
a.SaveAsFile(Environment.GetEnvironmentVariable("TEMP") + "\\" +
a.FileName);
}
}
}
}
}
Please someone help me how to proceed furthur.
Thank you,
Bharathi
Brian Tillman - 18 Sep 2007 13:40 GMT
> I have a requirement where i need to extract the contact which is
> present as an attachment in the mail and save it into my Outlook.
[quoted text clipped - 3 lines]
>
> I am using C#.net for programming..
The programming groups are microsoft.public.outlook.program_vba and
microsoft.public.outlook.program_addins. You might get a better response
there.

Signature
Brian Tillman [MVP-Outlook]