Treason
#@$%#!
- Local time
- Today, 17:38
- Joined
- Mar 12, 2002
- Messages
- 340
I am using the code below to fill internet form data from an access form. I forget where I got the code but it's works great. Try it out for yourself. But I would love to know what other properties are available.
For example,
Can I hit the submit button on the webpage?
Can I save the source to a txt file, to check whether the update was successful?
Things like that...
Does anyone have documentation on CreateObject("InternetExplorer.Application")??
For example,
Can I hit the submit button on the webpage?
Can I save the source to a txt file, to check whether the update was successful?
Things like that...
Does anyone have documentation on CreateObject("InternetExplorer.Application")??
Code:
Option Compare Database
Option Explicit
Dim browser As Object
Dim doc As Object
Private Sub Command1_Click()
Set browser = CreateObject("InternetExplorer.Application")
With browser
.Visible = True
.Navigate "http://www.tech-nyc.com/index.php"
DoEvents
End With
If browser.LocationURL = "" Then
Do
Loop Until browser.LocationURL <> ""
DoEvents
Set doc = browser.Document
Else
Set doc = browser.Document
End If
If doc.readyState = "complete" Then
MsgBox "Ready"
doc.Forms(0).elements("input1").Value = "Value"
doc.Forms(0).elements("input2").Value = "Value"
doc.Forms(0).elements("input3").Value = "Value"
doc.Forms(0).elements("input4").Value = "Value"
End If
End Sub