Open Existing MS Project File

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joe Cletcher

    Open Existing MS Project File

    It must be simple, but how do I open an existing MS
    Project file? I've tried

    Dim Proj as MSProject.Proje ct
    Proj = CreateObject("M SProject.Applic ation")
    Proj.FileOpen(" D:\Path\MyExist ingProjectFile. mpp")

  • Fergus Cooney

    #2
    Re: Open Existing MS Project File

    Hi Joe,

    And it failed in what way, exactly?

    Do you simply want to launch MSProject or do you want control it through
    Automation?

    Regards,
    Fergus


    Comment

    • Joe Cletcher

      #3
      Re: Open Existing MS Project File

      When attempting to execute the command

      Proj = CreateObject("M SProject.Applic ation")

      the following runtime error message was received.

      "An unhandled exception of
      type 'System.Invalid CastException' occurred in
      MyProg.exe. Additional information: Specified cast is not
      valid."

      I take the error message to mean "MSProject.Appl ication"
      is incorrect and another text string is required to
      create a Microsoft Project project/application.

      Need to know how to create the Microsoft Project object
      (whether it is a project or an application) and then open
      an existing Microsoft Project file.
      [color=blue]
      >-----Original Message-----
      >Hi Joe,
      >
      > And it failed in what way, exactly?
      >
      > Do you simply want to launch MSProject or do you[/color]
      want control it through[color=blue]
      >Automation?
      >
      >Regards,
      >Fergus
      >
      >
      >.
      >[/color]

      Comment

      • Joe Cletcher

        #4
        Re: Open Existing MS Project File

        Found an answer! The following syntax worked:

        Dim myProj as MSProject.Proje ct
        myProj = GetObject("c:\T est.mpp")
        [color=blue]
        >-----Original Message-----
        >Hi Joe,
        >
        > And it failed in what way, exactly?
        >
        > Do you simply want to launch MSProject or do you[/color]
        want control it through[color=blue]
        >Automation?
        >
        >Regards,
        >Fergus
        >
        >
        >.
        >[/color]

        Comment

        Working...