Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel automation and procedures
Message
From
21/03/2018 04:31:28
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
20/03/2018 18:44:32
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01658838
Message ID:
01658897
Views:
48
>>>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform