[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 912
  • Last Modified:

How to read a mpp file from MS ACCESS using VBA

Hi,
I have a requirement, where I would need to open MS project ( mpp files) placed in an active directory.
I would need to read the contents of the mpp file, especially the contents of a custome field, along with start date, end date and percent complete and save the data in a ACCESS table.
Could anyone please help me with the code to perform the task.
I am in urgent need of the solution. PLEAS HELP
0
rnemani
Asked:
rnemani
  • 5
  • 4
1 Solution
 
defi0Commented:
I assume you want to write a program that does this (you could naturally simply export Project's data manually and then import it into Access).
You need to use Project's Automation API from an Access VBA procedure. The Automation API is fully described in Project's online help (assuming you chose to install it during installation).
0
 
rnemaniAuthor Commented:
Does that mean that the machine which would be using the ACCESS form to read the data need to have the project automation API installed.
How do I use the API, do you have any code snippets
0
 
defi0Commented:
The machine will need MS Project installed.

As for code snippets, they are in the documentation. I haven't used Project automation for ages, I don't have samples handy. But I remember writing a gateway between Project and a timesheet application a long time ago using this technique and it worked just fine.
0
Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
rnemaniAuthor Commented:
I tried searching for the Project' Automation API, but was not able to find any. Coudl you point me to the right direction
0
 
rnemaniAuthor Commented:
come to think of it is the project automation API in MS Project.
I am looking at extarcting data from MS Project using ACCESS VBA code.
For e.g. The MS project ( .mpp files) would be in  an active directory. User will open the Access form and press a button. THe code inside the button will read each of the .mpp files and take the data in the .mpp files and store it into a table.
I apologize if I was not clear on the requirement
0
 
defi0Commented:
I don't believe you can read an MPP file from Access without using MSProject. The file format is not open. You need to communicate with MSProject from your Access code using Automation. But naturally this requires that Project be installed locally (or remotely if you use DCOM - Distributed COM - in which case all you client machines could be accessing a single Project license to access the MPP data).
Unfortunately, I don't believe there's a simpler solution to your problem.
0
 
rnemaniAuthor Commented:
Did not find the right answer can we please close this question
0
 
defi0Commented:
That's right. I did not think of using Project's OLEDB provider, which can be installed without a Project license. Sorry 'bout that. I did not earn the "points".
However, I thought I would mention it here nevertheless so that others can benefit from the answer.

0
 
rnemaniAuthor Commented:
did not find the right answer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now