Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# MS Project Interop - Get Resource's Working Time

In MS Project I can go the resource sheet, then right click on a resource, go the the Resource Information dialog, then click "Change Working Time..." and enter holidays, sick leave or other absences for that resource. I'd like to access the same information programatically from C#.

I have the Microsoft.Office.Interop.MSProject.Project object loaded in memory and I can access tasks and other properties. From the Project object I can access the Resource property (type Microsoft.Office.Interop.MSProject.Resource) but don't know where in that type to find a resource's working times.

I'm using VS2008 with MS Project 2007.

Any help appreciated.

like image 702
ng5000 Avatar asked Nov 04 '22 22:11

ng5000


1 Answers

My (out of date) understanding of MS Project is that the working time for a resource is set in a calendar. After a quick Google (and Bing!), it looks that something like this is what you're after.

like image 69
Peter K. Avatar answered Nov 12 '22 22:11

Peter K.