none
Disappearing IE Object RRS feed

  • Question

  • 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?

    Saturday, March 29, 2014 4:05 PM

Answers

  • That is correct.  You cannot manipulate an email message with IE.  You can only display it.  What you are seeing is not IE but is IE hosting a special control that can display a message.


    ¯\_(ツ)_/¯

    • Marked as answer by Frederik Long Sunday, March 30, 2014 3:45 PM
    Saturday, March 29, 2014 4:33 PM