Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error when using oIE.Document property
Message
From
24/02/2004 15:31:59
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Error when using oIE.Document property
Miscellaneous
Thread ID:
00880444
Message ID:
00880444
Views:
62
I was trying to use this code in VFP 8 SP1 on Win XP Pro machine:

oIE = CREATEOBJECT("InternetExplorer.Application")
oIE.Navigate("http://office.microsoft.com/assistance/2002/articles/crabby_columns.aspx")

INKEY(1)
lnStartInSecs = SECONDS()
DO WHILE oIE.Document.ReadyState <> "complete" AND (SECONDS()-lnStartInSecs < 30)
ENDDO

Code crashes on the DO WHILE line and gives this error messagebox:
"Program Error"
"Member DOCUMENT does not evaluate to an object."

I have checked FoxWiki for Automation examples, most use program code similar to above. Checked the Object Browser for the Document property. It's there. Also reviewed Intellisense after creating an oIE instance, oIE.Document.ReadyState is there as well (but not sure about the next set of Intellisense values of which "READYSTATE_COMPLETE" is one, it is not a #DEFINE in Foxpro.h file).

Any guesses to what is needed to fix this code?
Thank you.
Mark Rietman
Next
Reply
Map
View

Click here to load this message in the networking platform