Import RFC822 Message (*.eml) Emails to Outlook INBOX

Hi Team,

This Module Allows to Move the .Eml Message to Specific OutlookFolder

Below Xaml File Attached For reference

Move_Mails_To_OutlookFolder.xaml (7.1 KB)

Assembly Details

Using Microsoft.Office.Interop.Outlook;
Using Microsoft.Office.Interop.Outlook;

Regards,
Sanjay

Method -2

Dim _app As  Microsoft.Office.Interop.Outlook._Application=Nothing
Dim _ns As  Microsoft.Office.Interop.Outlook._NameSpace=Nothing
Dim inbox As Microsoft.Office.Interop.Outlook.MAPIFolder=Nothing
Try
 _app=New Microsoft.Office.Interop.Outlook.ApplicationClass()
 _ns=_app.GetNamespace("MAPI")
 
 Dim file_Name As system.String = "sanjay.shankhla.eml"
 System.Diagnostics.Process.Start(file_Name)
 system.Threading.Thread.Sleep(5000)
  _app=CType(System.Runtime.InteropServices.Marshal.GetActiveObject("Outlook.Application"),Microsoft.Office.Interop.Outlook.ApplicationClass)
  Dim Item As Microsoft.Office.Interop.Outlook.MailItem=CType(_app.ActiveInspector().CurrentItem, Microsoft.Office.Interop.Outlook.MailItem)
 Dim reply_folder as Microsoft.Office.Interop.Outlook.MAPIFolder=_ns.Folders("Email_id").Folders("reply_folder")
  item.Move(reply_folder)
  system.Windows.MessageBox.Show("Subject=>"+Item.Subject)

      Item.Close(Microsoft.Office.Interop.Outlook.OlInspectorClose.olDiscard)
Catch ex As System.Exception
 System.Windows.MessageBox.Show(ex.Message)
End Try

Regards
Sanjay