I've got a program I've created to automate a process here at work. One of the tasks I want to automate is for data from an Access Form to automatically populate to textfields in a webpage on Internet Explorer.
I can do this by bringing up a new webpage with this:
[vba]Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "http://zip4.usps.com/zip4/welcome.jsp"
IE.Visible = True
While IE.busy
DoEvents
Wend
IE.Document.all("address2").Value = "123 Carraige Way"
IE.Document.all("city").Value = "Shreveport"
IE.Document.all("State").Value = "CA"
IE.Document.all("zip5").Value = "90210"[/vba]
If you run this code, you'll see that it works perfectly.
My issue is that I need to populate text to an already exisitng webpage- one that's already open in internet explorer. This is due to the fact that the webpage I need to work with can only be accessed after a user logs into the website, and for security reasons I am not going to automate the login procedure.
What do I need to adjust so that I can get the above code to focus on an existing page?