Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Contacts / September 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bharathi - 18 Sep 2007 07:16 GMT
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]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.