0
'~~> 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
我已經成功打開MPP文件,但我想複製特定的任務數據到Excel.But我不知道該怎麼做。我的MPP有很多任務。 請幫助。如何將任務數據從Microsoft Project Plan複製到Excel?
我已經提到了下面的鏈接,但我不能讓代碼如何從MPP複製任務的數據到Excel enter link description here
我只想要從特定視圖中的特定任務相關的數據 – coder25 2012-02-22 16:01:29