+ Reply to Thread
Results 1 to 3 of 3

Append value to url in IE using window handle?

  1. #1
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Append value to url in IE using window handle?

    Hello all ...
    I'm trying to manipulate a URL in an already opened IE browser window. In a nutshell, I need to change "http://www.excelforum.com" to "http://www.excelforum.com/this-is-the-new-part"

    The code prior to this does the following:
    - Opens a new instance of IE
    - Enters the username and password required to get into the site
    - Scrapes the source code, imports it into Excel, and parses the data
    - Finds a row based on the current date and some text
    - Extracts from that row a unique identifier...
    - Obtains the window handle ID for the instance of IE displaying the website

    Now I need to add the unique identifier to the url. I cannot open it in a new tab or instance of the browser, as it revokes back to the login screen.

    I was assuming that the best way to do this would be to get the window handle, then just send a "tab" to get back to the URL, and enter the new URL.

    If there's any other way to do this, I'm all ears. Otherwise, how can I send the keys using the window handle?

    Thank you for any help
    Last edited by JP Romano; 11-03-2009 at 10:02 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Append value to url in IE using window handle?

    The talk of window handles sounds like you're making it more complicated than it needs to be. Why can't you use your opened IE instance and navigate it to the new URL? Something like this:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Append value to url in IE using window handle?

    Chippy - excellent... works like a charm. That's exactly what I was looking for, but had no luck finding it in my searches. I agree that the window handle was way more complex than it needed to be, but couldn't figure out another approach on my own. Very much appreciated!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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