Solved

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

Posted on 2014-02-05
3
415 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 82

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Gain an elementary understanding of Blockchain technology.
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

627 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