
Launching MS App from within VB app
Hello all,
This will (hopefully) be a VERY simple question.
I have created a very simple application in VB 3 that has menu
selections that will open a document in it's associated application.
The simple code for one of these menu objects is as follows:
Sub CommToolsEnrolTrial_Click ()
Dim I, X, Msg
' AppActivate "Microsoft Visual Basic"
' SendKeys "%{ }{Down 3}{Enter}", True
X = Shell("C:\...\WINWORD.EXE C:\...\STRIAL.DOC", 1)
End Sub
As you can see, if the user returns to my app after making a selection,
and makes another selection, the application will launch again. Having
20 copies of Word open in WFW....BOOM!
How can I get my objects to check to see if the application is alerady
running, and either open the document in the already launched
application, or laiunch the application and open the document if not?
I will be using Word 6, Excel 5 and PowerPoint 4 and the app will be
running in either WFW or WIN 95.
Thanks a million in advance.
Jeremy Russell
William M. Mercer Limietd