Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP 6.0 and Word97
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00155685
Message ID:
00155785
Vues:
22
I'm not using NewObject, I use GetObject() instead. GetObject() activates an OLE automation object and creates a reference to the object.

loWord = GetObject(, "Word.Application")

IF (Type("loWord") = "C") AND Empty(loWord)
*-- Error
ELSE
*-- Do some work here
ENDIF

GetObject() return an empty string if an error occurs.

HTH

>That is what I am trying to avoid. Although it seems like the only way.
>
>On another note can you tell how you initialize your OLE call to Word97? I am currently using the following:
>
>oWord = NewObject( "Word.Application" )
>oWordDoc = NewObject( "Word.Document" )
>
>The oWord object can be a problem if for some reason Word is already active. Although it would not fail, it would return an invalid object.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform