Render Outlook emails in MS access as they appear in Outlook

Outlook version
Outlook 2016 32 bit
Email Account
Exchange Server
#1
HI Everyone,

I'm using windows10, outlook 2016 -32 bit.

Using Visual Basic in MS Access, once you have the current mail item, is there a way to display the email contents (assuming it is HTML), as you would see the email rendered using the mail client in MS outlook, but, on a form in MS Access?

Essentially I want to see the same view but using MS Access...

Many thanks,

Philip
 
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
#2
I don't use access enough to know what the controls support, but you'd need a text control that can support html. plain text should display properly in the text field as long as the line breaks were not removed.
 
Outlook version
Outlook 2016 32 bit
Email Account
Exchange Server
#3
HI Diane,

Thanks for the reply. I have solved it:

Add a Microsoft Web Browser Control to the form and use the following code:

  1. Dim HTML As String
  2. HTML = "<html><body>Testing...</body></html>"
  3. WebBrowser1.Navigate "about :blank" '/// initialize the browser window
  4. DoEvents
  5. With WebBrowser1.Document
  6. .write HTML '/// write the HTML to your browser window {in our case item.htmlbody}
  7. End With
Many thanks,

Code sourced from: Set HTML in WebBrowser control [resolved]-VBForums
 

Similar threads

Top