Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Need to read MS Project subproject tasks without re-opening each subproject file

$
0
0

My COM Add-In application reads information from MS Project tasks via COM interop using Microsoft.Office.Interop.MSProject.When the Project object (theProject) contains inserted subprojects, my app reads the tasks like this:

ForEach subProjAsSubproject In theProject.Subprojects

   For Each tsk asTask in subProj.SourceProject.Tasks

         Dim idasInteger = tsk.ID

         ...

   Next

Next

Even though the user has opened the master project in MS Project and can see all subproject tasks on his screen,  mycode causes MS Project to RE-OPEN each subproject file!  I know this because sometimes the subproject files are marked as read-only.   In this case my code forces the user to respond to a user prompt as the code iterates through each subproject. This is very slow and is a very bad user experience.   Is there some way to iterate through the subproject tasks without having MS Project re-open each subproject file?


...Jim Black


Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>