title: Copy outlook email content(have images , text , table etc) to microsoft word document
body: <p>I would like to use a outlook email for the message content. Lets say i have some formatted content containing images ,tables, colors, sizes, etc. Now I'd like to copy/paste all this content into an microsoft word document with proper alignment as same in the outlook email</p>
  
  <p>Here is the code</p>
  
  <pre><code>            Microsoft.Office.Interop.Outlook.Application app = null;
              Microsoft.Office.Interop.Outlook._NameSpace ns = null;
              Microsoft.Office.Interop.Outlook.MailItem item = null;
              Microsoft.Office.Interop.Outlook.MAPIFolder inboxFolder = null;
              Microsoft.Office.Interop.Outlook.MAPIFolder subFolder = null;
              try 
             {
                app = new Microsoft.Office.Interop.Outlook.Application();
                ns = app.GetNamespace("MAPI");
                ns.Logon(null,null,false, false);
  
                inboxFolder = ns.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox);
                subFolder = inboxFolder.Folders[3]; 
                Console.WriteLine("Folder Name: {0}, EntryId: {1}", subFolder.Name, subFolder.EntryID);
                Console.WriteLine("Num Items: {0}", subFolder.Items.Count.ToString());
  
                for(int i=1;i&lt;=subFolder.Items.Count;i++)
                {
                  item = (Microsoft.Office.Interop.Outlook.MailItem)subFolder.Items[i];
                  Console.WriteLine("Item: {0}", i.ToString());
                  Console.WriteLine("Subject: {0}", item.Subject); 
                 // Console.WriteLine("Sent: {0} {1}" item.SentOn.ToLongDateString(), item.SentOn.ToLongTimeString());
                  Console.WriteLine("Categories: {0}", item.Categories);
                  Console.WriteLine("Body: {0}", item.Body);
                  Console.WriteLine("BodyFormat: {0}", item.BodyFormat);
                  Console.WriteLine("HTMLBody: {0}", item.HTMLBody);
                  Console.WriteLine("Attachment:{0}", item.Attachments.Count);
  </code></pre>