Internet Explorer is capable of decoding .eml E-Mail messages. I am trying to automate the process, using this script:
Set oIE = CreateObject("InternetExplorer.Application")
oIE.visible = True
oIE.Navigate("www.startpage.com")
WScript.Echo "TypeName1=" & TypeName(oIE), "VarType1=" & VarType(oIE)
oIE.Navigate("d:\msg.mht")
WScript.Sleep 1000
WScript.Echo "TypeName2=" & TypeName(oIE), "VarType2=" & VarType(oIE)
Screen output:
TypeName1=IWebBrowser2 VarType1=8
TypeName2=Object VarType2=9
The script works well when I open a web page, e.g. startpage.com, giving me the full set of properties and methods available with the oIE object. However, as soon a I use the object to open an eml file (renamed with an .mht extension) I lose all properties and methods of the oIE object, thus preventing me from manipulating the data displayed by the oIE object.
How can I gain access to the eml data shown by the IE object?