Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CreateObject
Message
De
28/03/2002 06:21:59
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
CreateObject
Divers
Thread ID:
00638312
Message ID:
00638312
Vues:
57
Hi

I am creating a word object as shown below but if its already open i get an error, how could I check to see if its already open first and if it is show it?

lcFilename = "myDoc.doc"

ON ERROR show_message('No word application found') && show message
oWord = createobject('Word.Application')
with oWord
ON ERROR show_message('Document not found')
.Documents.Open(lcFilename)
.visible=.t.
.Activate
endwith
ON ERROR && restore system error handler

Thanks
Nelly
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform