Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is it possible to control my .EXE from other application
Message
From
28/01/1999 12:25:21
 
 
To
28/01/1999 11:56:52
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00180780
Message ID:
00181406
Views:
12
>Hi,
> Do you mean I have to write macro in Word incase to control my application?
>However, actually, my app. will automate word 97 to open .doc file to allow TTS engine to read the content of document. So, i don think I should use word97 to automate my application...Or is it possible to write a macro to detect the instance of my application and then close it??

It's absolutely possible to have a Word macro instantiate a COM object (VBA is very good at that) and then pass stuff through the OLE interface to your object.

If you want a button to appear in Word to close your application, but leave Word running, you need to run some VBA code to talk to you application to shut it down, so obviously, you need a Word macro here. Alternatively, you can just use Alt-TAB to switch between applications and use you own application's interface to shut things down, so that Word isn't concerned with what your application is doing.

If your application doesn't have an OLE interface, finding and shutting down your application programmatically in Word will involve API calls in VBA; I haven't tried doing that myself, but there's reasonable documentation on programming in VBA available from third-party sources; a trip to one of the larger chain bookstores like Barnes & Noble, or one of the on-line sites like amazon.com should provide you with plenty of titles.

Whether you write your app as an OLE server and have Word instantiate it and talk to it via an OLE interface, or your application launches Word and gets things back is a matter of how you design the application to work. From a design standpoint, which app is in control - is your app acting as an extyension of Word, or is Word providing services back to your application? the answer to that should drive the design.
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
Previous
Reply
Map
View

Click here to load this message in the networking platform