I want to fill in a form (It's at this URL)
http://www.paycoinc.com/employee_tc_login.htm
and submit it. I can easily do it with Sendkeys, but that is not
reliable. I want to do it with Internet Explorer OLE Automation. This
is what I have so far, but VBScript throws "Object doesn't support this
property or method". I think it could be done by just posting the data
directly to the server, but I can't seem to get a good example of that in
VBS.
An email reply would be greatly appreciated.
Thank you in advance.
Ben Langton
langt...@stny.rr.com
Const USER_NAME = "blahblah"
Const PASSWORD = "blahblah"
Const WEB_PAGE = "http://www.paycoinc.com/employee_tc_login.htm"
Const TITLE = "PayCo Employee Login"
Const READYSTATE_COMPLETE = 4
Dim oIE
Dim WSHShell
Dim boolActivated
'On Error Resume Next
Set WSHShell = CreateObject("WScript.Shell")
'open Internet Explorer and go to the page
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Visible = True
oIE.Navigate WEB_PAGE 'opens the html page
boolActivated = WSHShell.AppActivate(TITLE)
While Not boolActivated
Wscript.Sleep 50
boolActivated = WSHShell.AppActivate(TITLE)
Wend
Do While oIE.ReadyState <> READYSTATE_COMPLETE
Wscript.Sleep 250
Loop
oIE.Document.All.ssn.Value = USER_NAME -----------> here's the error
'oIE.Quit
Set oIE = Nothing