'~~> Code to open MPP file in Excel
Sub Sample()
Dim appProj As MSProject.Application
Dim aProg As MSProject.Project
Dim wb As Workbook
Dim ws As Worksheet
Set wb = ActiveWorkbook
'~~> This is the Sheet Where you want the data to be copied
Set ws = wb.Sheets("Sheet1")
Set appProj = CreateObject("Msproject.Application")
'~~> This is a MS Project File. Change path as applicable.
appProj.FileOpen "C:\MS Project.mpp"
Set aProg = appProj.ActiveProject
appProj.Visible = True
'~~> Now you have the MPP file opened, rest of the code goes here
End Sub
I have successfully opened MPP file but I want to copy paticular task data to Excel.But I have no idea how to do it.My MPP has many tasks. Please Help.
I have referred to the following link but I am unable to get the code how to copy tasks data from MPP to excel enter link description here
Here is some code (Project VBA) that can inspire you:
Source