Solved

Display a specific Outlook message  in a WebBrowser control ( formatted as I see it  in Outlook)

Posted on 2014-02-05
3
399 Views
Last Modified: 2014-02-11
After the usual searches I only got this old code that does not run anymore (CreateTempMht does not exist in email class):

 string mhtFilename = email.CreateTempMht("c:/MailClientData/temp/temp.mht");
    if (mhtFilename == null)
    {
        MessageBox.Show(email.LastErrorText);
        return;
    }
      
    // Load the MHT in the WebBrowser:
    webBrowser1.Navigate("file:///C:/MailClientData/temp/temp.mht");


Any Help?
0
Comment
Question by:novreisb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 81

Expert Comment

by:David Johnson, CD, MVP
ID: 39838098
you can save the mht as an attachment but it probably will be blocked by outlook.
0
 

Accepted Solution

by:
novreisb earned 0 total points
ID: 39839742
Hi David,
It was not easy for me to put the msg in webbrowser control, so I made the option the most  easy (not the best option, but it works for a "Proof of Concept" programmer like me).
I save it as msg file and open it at once

mail.SaveAs(@"C:\temp\" + ID + ".msg", Outlook.OlSaveAsType.olMSG);
                outlook1.Session.OpenSharedItem(@"C:\temp\" + ID + ".msg");
                mail.Display(true);
                Marshal.ReleaseComObject(mail);

Thks anyway
0
 

Author Closing Comment

by:novreisb
ID: 39849656
I only program to have a Proof of Concept (prototype). Once the results (what is seen by my  potentials customers ) are good, I will give my code to a professional programmer to put it right!
0

Featured Post

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

With the internet and the ease of information transference, many professional jobs can be done anywhere today.  Why should it make a difference whether an x-ray is read in India or the United States as long as the radiologist is qualified?   Outso…
Companies keep a much closer eye on costs today, so changing to new Technology – Microsoft Office 365 is the smartest move to take.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question