Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the best way to initalize Word97 from VFP6?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00156542
Message ID:
00156557
Vues:
40
>I have been trying to make calls to Word97 with limited success with the following code:
>
>oWord = NewObject( "Word.Application" )
>oWordDoc = NewObject( "Word.Document" )
>
>oWord may return an invalid object if Word is for some reason already running.
>
>What is the most bullet proof method to call and validate the proper instantiation of Word 97?
>
>Thanx

before executing, you could:
if vartype(oWord) = "O" and !isnull(oWord)
   if oWord.Name = "Microsoft Word"
      *** then you have a Word object instanciated
   else
      *** whatever here
   endif
else
   oWord = NewObject( "Word.Application" )
endif
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform