Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel automation and procedures
Message
De
21/03/2018 04:31:28
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01658838
Message ID:
01658897
Vues:
52
>>>What I now try is to create a singleton object with lazy instantiation of a word application object. At instantiation I get the process ID of the word process and when doing automation work it checks if the object is still alive, and when releasing the object it kills the process.
>>
>>Note the comma before 'word.application'!!
>
>That does the trick. However I still don't understand the meaning of GetObject, because when you run getobject after you have done a successful createobject, it still would create a new process each time, and the process stays alive unless you issue the quit method. I believe this was differently previous to Word 2003 or Word 2000, somewhere in those versions the way how word handled the different windows was entirely different.

I actually had the opposite problem - if the user had Word open, the createobject() would return a reference to that same instance, instead of creating a new one. Well this was W2003 or W2007, but may be a good time to revisit the thing, who knows what mischief it's now up to.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform