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
Solved

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

Posted on 2014-02-05
3
384 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
  • 2
3 Comments
 
LVL 80

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

839 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