Mar 28 2022 10:13 AM - edited Mar 28 2022 10:14 AM
Hi
We have desktop MS MPP File which has a custom field called Build Status which we want to update reading a rest api getting status details from an external system.
Is this possible?
Regards
Bukhtiar Ahmad
Mar 28 2022 10:45 AM
Hello @BukhtiarAhmadIBM ,
Are you using Project Server / Project Online? If so, yes you have an API to update data. Here is an example using PowerShell calling the REST API to update an enterprise project level custom field: https://github.com/officedev/project-rest-basic-operations/blob/master/updateprojectcustomfieldvalue...
Here are the docs on the REST API: https://docs.microsoft.com/en-us/previous-versions/office/project-javascript-api/jj669214(v=office.1...
Paul
Mar 28 2022 01:07 PM - edited Mar 28 2022 01:14 PM
Hi
Thanks for your response I am not using either of them I am using project professional edition installed on my PC
We have to update status custom column in MPP manually from another application one by one for 100 plus records so I was thinking we develop one simple API call and update this custom column automatically in MPP. If this is possible
Regards
Bukhtiar
Mar 28 2022 01:14 PM
Hello @BukhtiarAhmadIBM ,
In that case you will need to the user the Project object model to programmatically work with MPP files. You could write a VSTO add-in for MS Project and automate this - a user would launch MS Project then start your app from a custom button on the ribbon etc. Example VSTO add-in for Project: https://docs.microsoft.com/en-us/visualstudio/vsto/walkthrough-creating-your-first-vsto-add-in-for-p...
Paul
Mar 28 2022 01:17 PM
Mar 28 2022 01:21 PM
Hello @BukhtiarAhmadIBM ,
There is no REST API for MS Project - only Project Server / Project Online. Working programmatically with mpp files requires you to use MS Project. You can automate this using the Project Object model via a VSTO add-in or even a simple VBA Macro.
Paul
Apr 03 2022 12:39 PM
Apr 04 2022 05:28 AM
Hello @BukhtiarAhmadIBM ,
Here are a few examples for Excel VBA:
https://www.appsloveworld.com/solved-how-to-call-rest-api-from-excel-macros-vba-and-parse-json/
https://stackoverflow.com/questions/38246789/how-do-we-use-restful-apis-from-excel-macros-vba
These might help you get something working from MS Project.
Paul
Apr 05 2022 08:50 AM
I am getting error on below line is there an option to connect on webcall and discuss?
Set Jsonresult = JsonConverter.ParseJson(result)
Regards
Bukhtiar
Apr 05 2022 09:48 AM
Hello @BukhtiarAhmadIBM ,
Unfortunately there is no option to web call and discuss from this forum. I would recommend posting the specific error on a developer focused forum such as stackoverflow.
Paul