Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WORD automation and busy signals
Message
De
17/01/2001 01:18:27
 
 
À
15/01/2001 01:05:17
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00463296
Message ID:
00464551
Vues:
26
>Neil
>
>FWIW, and since I am asking a question here too, there is another way that does not require polling etc:
>
>
>loshell=CREATEOBJECT("WScript.Shell")
>loshell.run("myfilename.doc",3,.t.)
>*---stops here until Word is closed
>messagebox("You closed word!")
>


This is not reliable, since if Word is already running, it invokes an MDI instance of Word, and Shell.Run, which relies on ShellExecuteEx(), can't determine the proper processid or threadid related to your running Windows instance. You'll get an "OLE IDispatch error code 0 from Wscript.Run - unable to wait for process" if an instance of Word is already running.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform