Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error when using oIE.Document property
Message
De
24/02/2004 15:31:59
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Error when using oIE.Document property
Divers
Thread ID:
00880444
Message ID:
00880444
Vues:
63
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform