0

Our company developed an Outlook plugin to implement our document management system. Users can drag e-mails from their Outlook folders to a grid in the plugin. After the drop the e-mail is imported into the document management system in the specific folder. The plugin also shows the content of document management system folders. When the user clicks on an e-mail the MSG-file is downloaded from the document management system, is inspected and the content is displayed in the plug-in in a self developed user control, which only contains labels ans one RTF-box to display the RTF-body.

The users are not happy with this user control because 'it doesn't look like Outlook'. We're looking for a way to display the MSG-file (saved on disk) in a 'out of the box'-control that looks like the Outlook e-mail control or maybe there is a way to use the one from Outlook itself?

Important for the user is to see the HTML version of the body, inline images, visible attachments with the ability to double click on them to open. In the perfect world the control may have a build in preview option (PDF, text, images,...)?

niton
  • 8,771
  • 21
  • 32
  • 52

2 Answers2

0

Outlook doesn't provide such controls. As a workaround, you can:

  1. Use .net controls for displaying the message content (for example, a web browser for HTML or any other custom controls).
  2. Save a .msg file on disk and open the file programmatically. The Outlook object model doesn't provide anything for that. But you can use the Process.Start method passing a filepath as a parameter. Due to the fact that only one instance of Outlook can be run at the same time the message will be opened in the running Outlook instance in a new inspector window.
Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
0

Use Namespace.OpenSharedItem / MailItem.Display:

set Msg = Application.Session.OpenSharedItem("c:\Temp\test.msg")
Msg.Display
Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78