Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine if MCS Word object exists?
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00579954
Message ID:
00579960
Views:
14
This message has been marked as a message which has helped to the initial question of the thread.
>I want to use an existing Word object if already open, if not, open one. How to determine if an instance is already open?
>
>if ???????????
> oMW=createobject("word.application")
>else
> oMW=getobject(,"word.application")
>endif

You might want to look at my "Is a Windows Application Running?". It checks for the existence of a window based on the known portion of the title bar. Note, however, that Word 2000 and above, spawn a new window for each document regardless if one already exists. If that's the target version, then you can by-pass GETOBJECT() altogether.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform