M
Mike
I am working on an application that will be run when a IE window is
already open to the correct page URL (the URL is a dynamic name- it
changes every time). I need the application to fill in 2 form text
fields and click the submit button. I found this example code that
works by navigating a new IE window to a fixed URL and it works great-
but how can I change this to fill in the fields to an already open IE
window ? I have played around with the FindWindow function and the
AppActivate, but cannot make this all work...
thanks for any help on this.
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "http://www.usps.com/ncsc/lookups/lookup_ctystzip.html"
IE.Visible = True
While IE.Busy
DoEvents
Wend
Set ipf = IE.document.All.Item("city")
ipf.Value = "12345" 'fill in the text box
Set ipf = IE.document.All.Item("submit1")
ipf.Click 'click the submit button
IE.Quit
already open to the correct page URL (the URL is a dynamic name- it
changes every time). I need the application to fill in 2 form text
fields and click the submit button. I found this example code that
works by navigating a new IE window to a fixed URL and it works great-
but how can I change this to fill in the fields to an already open IE
window ? I have played around with the FindWindow function and the
AppActivate, but cannot make this all work...
thanks for any help on this.
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "http://www.usps.com/ncsc/lookups/lookup_ctystzip.html"
IE.Visible = True
While IE.Busy
DoEvents
Wend
Set ipf = IE.document.All.Item("city")
ipf.Value = "12345" 'fill in the text box
Set ipf = IE.document.All.Item("submit1")
ipf.Click 'click the submit button
IE.Quit