Hello, please i need help reading data from a closed ms project file into my MS Word document, i want to be able to read data like projectStartDate, projectFinishDate, task, taskStart, taskFinish, PercentageComplete and so other information into my word document. a friend suggested using FileOpenEx property which i tried using but i dont seem to be able to walk round it please i need help in doing this
please i need help with this, i really appreciate your suggestions
thanks
Code:
Private Sub import()
Dim part As String
Dim mpp As MSProject.Application
Dim eager As Date
Dim myTask As Task
Dim mystring As String
Dim myRange As Range
Set mpp = New MSProject.Application
mpp = GetObject(part)
mpp.FileOpenEx Name:="C:\Users\McBajo\Desktop\CPMS\tryout.mpp", ReadOnly:=True, openpool:=pjPoolReadOnly
For Each myTask In mpp.Tasks
If myTask.Notes <> "" Then
mystring = myTask.UniqueID & ": " & myTask.Name & ": " & myTask.Notes & ": " & myTask.Start & ": " & myTask.Finish & ": " & myTask.PercentComplete & ""
ActiveDocument.Tables(1).Cell(10, 2).Range.Text = mystring
mpp.Quit
Set mpp = Nothing
End Sub
please i need help with this, i really appreciate your suggestions
thanks