How to save the contact which is present as an attachment in the m

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Bharathi said:
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..

The programming groups are microsoft.public.outlook.program_vba and
microsoft.public.outlook.program_addins. You might get a better response
there.
 
Back
Top