Does anyone know of a way to display a .msg file in a form control? (1 Viewer)

CJ_London

Super Moderator
Staff member
Local time
Today, 07:39
Joined
Feb 19, 2013
Messages
16,612
I have a need to display a variety of file types on a form - pdfs and html can be displayed in a web browser control and images in an image control for example

At the moment I need to manually open a (MS Outlook) .msg file then save as htm to display the msg in a web browser, but I would prefer not to have to manually convert it. I appreciate this could be automated but in order to follow the 'chain of custody' I would prefer not to convert it at all.

Any suggestions?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 07:39
Joined
Feb 19, 2013
Messages
16,612
Thanks @ebs17 I had seen that link but couldn’t see anything that would enable me to view a .msg in a form control. An unbound OLE control shows that it is a msg, but not the contents.

Perhaps you have seen something I missed? If so, please give me a clue😊
 

ebs17

Well-known member
Local time
Today, 08:39
Joined
Feb 7, 2020
Messages
1,946
By naming the Outlook View Control I was probably too optimistic about its possibilities. Sorry.

Which contents of the msg file must be displayed? A msg file is a container, which can be opened with a simple text editor, with which e.g. beside some cryptic strings the content of the message is displayed in plain text. So you could load the msg file into a string variable, filter out unwanted content and display the actual message (TextBox, WebBrowser).

display ... on a form
Personally, I don't think that much of it. As an example: If one has a Word document, it should be displayed like a Word document, and it should work like a Word document. Controls and ActiveX will seldom and never permanently offer over different versions what the original (here Word) offers.

Therefore I prefer the way to give the files speaking names, so that you don't have to look into each file to find out what's in it. For the files thus reduced in number I use a display outside the access application via ShellExecute.
 
Last edited:

Users who are viewing this thread

Top Bottom