Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pull a URL into VB Script

Status
Not open for further replies.

VBmyWAY

MIS
Jan 6, 2005
1
US
Hello!

How can I pull the URL of a web page I've browsed to into a VB Script. I am not sure where to begin. In other words, I need the VB Script to find the browser that is running and grab the URL to be used in my script. The web page itself is not being launched from the script. The script is run after IE is launched and the page is reached.

I thought it would be easy, but I am in over my head.

ANY advice is appreciated and needed !

THANKS
 
Take a look at the GetObject function to get the running IE instance.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
here is an example of getting the running instance of excel

Set objApp = GetObject(, "Outlook.Application") '#### Find existing instance of Outlook
If Err Then
WScript.Quit() '#### If Outlook isn't running, quit the script
'Set objApp = CreateObject("Outlook.Application") '#### uncomment this & comment out above line to get data even if Outlook isnt running
End If
 
Hello all,

We would have a lot of disappointment ahead using getobject() on internet.explorer. That is unfortunately a no-go.

- tsuji
 
hmm, just tried it, no dice

not sure about dissappointment tsuji ;-) ive learnt something
 
Hello VBmyWay,

You may have a look on a past thread I'd participated in:
(There might be some others more.)

This is something of doing so many and getting so little. As a verification of concept, it is very good; but for production, scripting may not be the best vehicle.

regards - tsuji

ps mrmovie and all the old friends seem all on-line at present. My New Year's greetings to you all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top