Open Ms Project File Vba

Open Ms Project File Vba 6,1/10 7711 reviews

I am trying to find a quick way to open MS Project files as read-only, preferrably from explorer. I was following the tutorial head to do the same thing from excel.

Ms Project Vba Open Excel File

Vba

Microsoft Office Project 2007 no longer supports the AutoOpen macro. Instead, you can use the Project.Open event. Different ProjectOpen event handlers can run, depending on whether you are connected to Microsoft Office Project Server 2007. In the Visual Basic Editor, expand all of the nodes in the left pane to see the location of the ThisProject object in each project. You can put different ProjectOpen event handlers in ThisProject objects in each of the following nodes. VBAProject (Project name.mpp) You can save a ProjectOpen event handler in each project that runs when you open the project. You can be connected to Project Server or not, and the project can be stored on the local computer, on a file share, in a Shared Documents library in Windows SharePoint Services, or in Project Server.

Project

ProjectGlobal (Global.MPT) The ProjectOpen event handler in the global template runs only when you are not connected to Project Server and when you open any project stored on the local computer, on a file share, or in a Shared Documents library in Windows SharePoint Services. The following code example displays a message on when Project starts up, and a different message when you open a project. Sub ProjectOpen( ByVal pj As Project) If (pj Is Nothing) Then MsgBox 'Called ProjectOpen from Global.MPT.' Else MsgBox 'Global.MPT: Opened project: ' & pj.Name End If End Sub.

VBAProject (Global (+ non-cached Enterprise)) The ProjectOpen event handler in the enterprise project template runs only when you are connected to Project Server and when you open any project. The project can be local, on a file share, in a Shared Documents library in Windows SharePoint Services, or opened from Project Server. The following code is similar to the previous example, but displays different messages from the enterprise global template.

Posted :