Browsing to URL and reading contents
On Mon, 17 Nov 2003 at 07:59:47, Jake Marx (Jake Marx
) wrote:
Hi Mike,
This should work for you:
Public Function gbCheckScrabbleWord(rsWord) As Boolean
Dim ie As InternetExplorer
Dim sURL As String
Dim sHeader As String
Dim bytPostData() As Byte
Set ie = New InternetExplorer
ie.Visible = False
sURL =
"http://www.chambersharrap.co.uk/chambers/wwizards/wwizards.py/main"
bytPostData = "sword=" & rsWord & ""
bytPostData = StrConv(bytPostData, vbFromUnicode)
sHeader = "Content-Type: " & "application/x-www-form-urlencoded" &
vbCrLf
ie.Navigate sURL, 0, , bytPostData, sHeader
Do Until Not ie.Busy And ie.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
gbCheckScrabbleWord = InStr(1, ie.Document.body.innerhtml, "OSW ")
ie.Quit
Set ie = Nothing
End Function
Cheers very much
Can you please explain the difference between the Busy and the
ReadyState attribute - isn't testing for both overkill
I know the IE window opens in the background as invisible, but are there
any API's for going to viewing contents of URL's without needing IE
--
Mike
Please post replies to newsgroup to benefit others
Replace dead spam with ntl world to reply by email
|