+ Reply to Thread
Results 1 to 3 of 3

VBA to control Internet Explorer to open files

  1. #1
    Registered User
    Join Date
    01-28-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    2

    VBA to control Internet Explorer to open files

    Hello,

    I am trying to use VBA to control Internet Explorer as I'm hoping to open som XPS files and utilize some of the data in one of the files. When Attempting to run some simple code from the above sample I appear to be missing a reference. Do you know what reference library I need to turn on to run code relating to IE?

    Thanks,

    RugbyKorn

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: CreateObject("InternetExplorer.Application")

    microsoft internet controls
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    01-28-2013
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: CreateObject("InternetExplorer.Application")

    @JosephP

    Thanks for the reply, that is what I was looking for, found it slightly before you got back to me. Oddly I didn't get an email saying you replied so I'll make sure to check back in a bit.

    My next step, now that I am controlling IE is to open an XPS document (which I can do), then to search the XPS document. I am trying to use the inStr function to search it but unfortunately I can't seem to figure out what the document itself should be referred to.

    So:
    Please Login or Register  to view this content.
    "Active Document" could be replaced with innerHTML but its not a website so I don't think there is HTML. I tried using innerText but that doesn't seem to work (it doesn't validate that the word "test" is present in the document, which it is).

    My full code is:

    Please Login or Register  to view this content.
    I would expect the msg box at the end to contain the position of the "ToFind" string but it keeps coming back 0. I tried outerText and no luck there either.

    Would greatly appreciate any suggestions you may have.

    RugbyKorn

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1