Displaying HTML returned from a URL inside Outlook

  • Thread starter Thread starter Water Cooler v2
  • Start date Start date
W

Water Cooler v2

I want to display some HTML returned from a URL inside Outlook. I have
some thoughts on this. Tell me if I am correct. If not, please point me
to the right direction.

I would get a reference to the currently active explorer object using
the Application object. Then, I would want to display the HTML returned
from the URL into the Preview Pane of the ActiveExplorer's Pane's
Collection. This is where I am stuck. How do I do this?

Sorry for sounding naive. Also, it'll be nice if I could maximize the
preview pane or whichever window hosts the display of the HTML inside
Outlook itself.
 
Have you looked at the folder home pages (right click on a folder,
Properties, "Home Page" tab).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Thanks, Dmitry. That was a helpful clue that I could use for something
else. However, it seems that my problem is to display some HTML I have
in a string, obtained from some URL, into a web browser embedded into
Outlook itself.

Can you please give me some pointers to doing this task? Thanks.
 
Which web browser? I don't think you can access the folder home page IE
objects from outside of that page. And thee preview panee displays thee
contents of the ecurrently selected item. The only way to display something
in the preview pane is to modify the selected item and set its HTMLBody
property.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
OK. Let me start all over again. From a user's stand-point, this is
what needs to be achieved.

"When the user clicks one of the buttons on the toolbar of Outlook, he
must be shown a web page open up inside of Outlook itself."

From a programmer's stand-point, this is what needs to be done:

(1) I get a string that contains some HTML code.
(2) I need to display properly formatted HTML inside of Outlook itself.
(3) The HTML must be properly formatted so that the user gets to see
not the HTML code but the formatted content.
(4) The window in which this HTML is displayed must be maximized and it
must be within Outlook itself.


Thanks.
 
Create an HTML file in a temporary folder, copy the HTML string there, set
the MAPIFolder.WebViewURL and WebViewOn properties appropriately (where
MAPIFolder is Explorer.CurrentFolder). Outlook will display the HTML instead
of the message list. Whenever that HTML window needs to be closed
(Explorer.FolderSwitch event?), reset the WebViewURL and WebViewOn
properties and delete the temporary HTML file.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top