Launching External Applications
-
I am currently implementing an interface that will launch applications based on document information stored in an application I am building. I am trying to support all the popular applications (Notepad, WordPad, Word, Excel, Access, Powerpoint, Project, IE, Adobe AcrobatReader, Winzip, Visio, and FrontPage). I am using the CreateObject method to instantiate an object for a given application. set AppObj = CreateObject(".Application") Unfortunately, I can't find the proper application references for some of the applications I'm trying to launch. For example: Set AppObj = CreateObject("project.application") does not work. Additionally, I need to be able to determine the "Open" method required for each application. For example: Set AppObject = CreateObject("Access.Application") AppObject.Visible = True AppObject.OpenCurrentDatabase fpath Where can I find this information? Currently, I have the correct definitions for Word, Excel, Access, PowerPoint, and FrontPage. The others however, are a mystery.
-
I am currently implementing an interface that will launch applications based on document information stored in an application I am building. I am trying to support all the popular applications (Notepad, WordPad, Word, Excel, Access, Powerpoint, Project, IE, Adobe AcrobatReader, Winzip, Visio, and FrontPage). I am using the CreateObject method to instantiate an object for a given application. set AppObj = CreateObject(".Application") Unfortunately, I can't find the proper application references for some of the applications I'm trying to launch. For example: Set AppObj = CreateObject("project.application") does not work. Additionally, I need to be able to determine the "Open" method required for each application. For example: Set AppObject = CreateObject("Access.Application") AppObject.Visible = True AppObject.OpenCurrentDatabase fpath Where can I find this information? Currently, I have the correct definitions for Word, Excel, Access, PowerPoint, and FrontPage. The others however, are a mystery.
If I read what your doing correctly, all your are trying to do is launch an arbitrary application. In that case, all you have to do is start the application using the Shell. But, for some reason, you are using the automation front ends for these applications. But you don't specify why that is. The flaw in your plan is not obvious, but simple. Most applications don't expose a usable automation front end; Notepad, Wordpad, and WinZip being examples. Think about it... What is Notepad? Nothing but a TextBox control with a small interface wrapped around it. Wordpad is just an interface wrapped around a RichTextBox control. In order to help out with this we're probably going to need a bit more information about what you are trying to do and why. RageInTheMachine9532
-
If I read what your doing correctly, all your are trying to do is launch an arbitrary application. In that case, all you have to do is start the application using the Shell. But, for some reason, you are using the automation front ends for these applications. But you don't specify why that is. The flaw in your plan is not obvious, but simple. Most applications don't expose a usable automation front end; Notepad, Wordpad, and WinZip being examples. Think about it... What is Notepad? Nothing but a TextBox control with a small interface wrapped around it. Wordpad is just an interface wrapped around a RichTextBox control. In order to help out with this we're probably going to need a bit more information about what you are trying to do and why. RageInTheMachine9532
Thanks for the reply. Yes, I agree with respect to the simple applications (notepad, wordpad). I just listed them all because they are all on my list of common applications used by our users. However, with respect to MS Project and WinZip, I assumed that these Microsoft products would have some form of object model interface. The reason I don't want to use the shell, is that there will be instances whereby I will want to control aspects of the application launch that are not readily available through a Shell call. For example, I might want to auto-populate some tagged fields in Word. Any ideas where I can find the object interfaces for these types of applications (not the simple ones ... but Third Party and Microsoft non-office apps). Thanks,
-
Thanks for the reply. Yes, I agree with respect to the simple applications (notepad, wordpad). I just listed them all because they are all on my list of common applications used by our users. However, with respect to MS Project and WinZip, I assumed that these Microsoft products would have some form of object model interface. The reason I don't want to use the shell, is that there will be instances whereby I will want to control aspects of the application launch that are not readily available through a Shell call. For example, I might want to auto-populate some tagged fields in Word. Any ideas where I can find the object interfaces for these types of applications (not the simple ones ... but Third Party and Microsoft non-office apps). Thanks,
Paul Melanson wrote: WinZip Paul Melanson wrote: these Microsoft products Huh? Paul Melanson wrote: For example, I might want to auto-populate some tagged fields in Word. Well, Word has a COM automation interface, so that won't be too hard. I'd really like to see the day when all applications have automation interfaces.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi -
Paul Melanson wrote: WinZip Paul Melanson wrote: these Microsoft products Huh? Paul Melanson wrote: For example, I might want to auto-populate some tagged fields in Word. Well, Word has a COM automation interface, so that won't be too hard. I'd really like to see the day when all applications have automation interfaces.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma GandhiSorry ... I assumed WinZip was a MS product, since that is where I downloaded my last version. Yes, Word has what I need and it would be nice. Maybe XP and it's XML layer will solve the truly integrated office components problem; however, it is my understanding that it is still a few years away.