>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.