>Hi Mike and John,
>
>Thanks for
>Indeed the problem is that the object was not rendered yet.The code that I used to check this was :
>
>DO WHILE THISFORM.oWebBrowser.busy()
> DOEVENTS
>ENDDO
>
>
>Seemingly this code doesn't work. Instead I use John's code now that checks if the object exists and works fine now.
>
>I don't understand why the above code doesn't work. It work fine using OLE automation.
>
>Could someone explain this to me.
>
>Thank you.
>
>Zakaria al Azhar
You can actually use the readystate property too. There are two of those, one on the webbrowser and one on the document. The webbrowser returns a character and the document returns a numeric.
owebbrowser.readystate<>'complete'
owebbrowser.document.readystate<>4 && complete
As for your code not working, it's because you are referencing the web browser control, not the document which is another level down.
John
John Harvey
Shelbynet.com
"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright