Retrieve project start and end dates

Retrieving project start/end dates

GroupDocs.Viewer provides additional information such as project start and end dates for MS Project documents when calling GetViewInfo method. To retrieve view information for MS Project document call GetViewInfo method and cast output result to ProjectManagementViewInfo type.

Following example demonstrates how to retrieve view information for MS Project document.

using (Viewer viewer = new Viewer("sample.mpp"))
{
    ViewInfoOptions viewInfoOptions = ViewInfoOptions.ForHtmlView();
    ProjectManagementViewInfo viewInfo = viewer.GetViewInfo(viewInfoOptions) as ProjectManagementViewInfo;
 
    Console.WriteLine("Document type is: " + viewInfo.FileType);
    Console.WriteLine("Pages count: " + viewInfo.Pages.Count);
    Console.WriteLine("Project start date: {0}", viewInfo.StartDate);
    Console.WriteLine("Project end date: {0}", viewInfo.EndDate); 
}