Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Launching External Applications

Launching External Applications

Scheduled Pinned Locked Moved Visual Basic
adobetutorialquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Melanson
    wrote on last edited by
    #1

    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.

    D 1 Reply Last reply
    0
    • P Paul Melanson

      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.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      P 1 Reply Last reply
      0
      • D Dave Kreskowiak

        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

        P Offline
        P Offline
        Paul Melanson
        wrote on last edited by
        #3

        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,

        J 1 Reply Last reply
        0
        • P Paul Melanson

          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,

          J Offline
          J Offline
          J Dunlap
          wrote on last edited by
          #4

          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

          P 1 Reply Last reply
          0
          • J J Dunlap

            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

            P Offline
            P Offline
            Paul Melanson
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups