Results 1 to 4 of 4
  1. #1
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    IE (MSHTML) v6 breaks VBA - fixable? (Office 2000 VBA/IE 6)

    Hello, I have a VBA application hosted in Word that extracts certain financial information by reading a page from our intranet. While this could be done by opening the page into Word, the tag parsing capability of the Internet controls and MSHTML are more powerful, so my code uses them.

    Unfortunately, I have just learned that on computers upgraded to Internet Explorer 6, my code doesn't work, instead returning a compile error - "Object library feature not supported." This application worked flawlessly with IE 5.5, and the IE security settings look perfectly fine, so I gather that MS in its infinite wisdom has taken away this feature or secured it beyond my reach.

    The relevant code is as follows - the last line generates the error (ieDocSrc is highlighted when the message appears):

    Dim ieSrc As New InternetExplorer 'uses Microsoft Internet Controls {C:WINNTSystem32shdocvw.dll}
    ...code that loads an ASP page into the ieSrc window...this is not a run-time error, so I'll spare you...
    Dim ieDocSrc As MSHTML.HTMLDocument 'uses Microsoft HTML Object Library {C:WINNTSystem32mshtml.tlb}
    Set ieDocSrc = ieSrc.Document

    It would be very frustrating to have to go back to scraping the page using Word's native parsing tools, so I'm wondering if anyone is aware of a setting or quick fix that would avoid that terrible fate. I don't think rolling back to 5.5 is an option at this point, but I am looking forward to any other ideas!

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IE (MSHTML) v6 breaks VBA - fixable? (Office 2000 VBA/IE 6)

    The description of the error is very clear that the type library likely contains features not supported by VB, so the error should indeed occur on the Set statement.

    I sure hope that MSFT did not intend this error occur, but ...

    I'd call MSFT and/or post the question in the MSFT newsgroups.
    Try microsoft.public.windows.inetexplorer.ie55.program ming,

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: IE (MSHTML) v6 breaks VBA - fixable? (Office 2000 VBA/IE 6)

    Just to be clear, I don't have a problem with MSHTML.DLL version 5.5, only version 6. They took this functionality away, and I can't imagine that it was an oversight. They must have had some reason. I guess I could call (who would I talk to?), but I can't imagine they'll change it just for me.

    I think the best workaround is to get the data directly using ADO rather than hitting the intermediate page. Not that it will be easy, but in the long run, it is safer and more flexible. So for now I'm giving up on MSHTML. Maybe I'll find a third party control that will do what MSHTML used to do.

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: IE (MSHTML) v6 breaks VBA - fixable? (Office 2000 VBA/IE 6)

    Yes, but I'm not aware of a programming newsgroup for IE6.
    Ask in the IE 5.5 programming newsgroup if anyone is aware of such a change in IE 6.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •