View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jake Marx[_3_] Jake Marx[_3_] is offline
external usenet poster
 
Posts: 860
Default Browsing to URL and reading contents

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

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Mike wrote:
I am familiar with navigating to a URL and examining the text on a
page, but I want to be able to navigate here
http://www.chambersharrap.co.uk/cham...izards.py/main
put a word into the scrabble box, activate the arrow beside it, then
examine the results page that then follows to

There are other dictionary pages at this web page, but the word
validation is different and I need to validate against the scrabble
box

Please can someone tell me how this is done