Microsoft Project (MPP) files are used for different project management tasks like organizing and tracking projects and managing resources. If you want the project data in a document form to modify and share further, you can achieve that by converting the MPP file to Word DOC format. In this article, you will learn how to convert MPP files to Word documents using C#.
C# APIs for Converting MPP Files to Word Documents
We will perform this conversion using the Aspose.Tasks for .NET and Aspose.PDF for .NET APIs. The former is an API for working with Microsoft Project (MPP) files, whereas the latter is an API for creating, reading, and updating PDF files. We will use the Aspose.Tasks for .NET API to convert MPP files to PDF format and Aspose.PDF for .NET API to convert the generated PDF files to Word files. You can either install the APIs through NuGet or download them directly from the Downloads section.
PM> Install-Package Aspose.Tasks PM> Install-Package Aspose.PDF
Convert MPP Files to Word DOC/DOCX Files using C#
You can easily convert your MPP files to Word documents using the steps given below.
- Load the MPP file using the Project class.
- Create an instance of the MemoryStream class.
- Save the project to the stream as a PDF using the Project.Save(Stream stream, SaveFileFormat format) method.
- Load the PDF from the stream using the Document class.
- Save the PDF as a Word document using the Document.Save(string outputFileName, SaveFormat format) method.
The following sample code shows how to convert an MPP file to a Word document using C#.
Get a Free License
In order to try the API without evaluation limitations, you can request a free temporary license.
In this article, you have learned how to convert Microsoft Project MPP files to Word documents using C#. We used the Aspose.Tasks for .NET API to convert the MPP file to PDF format and Aspose.PDF for .NET API to convert the PDF to Word format. You can learn more about these APIs by exploring their official documentation. In case of any questions, please feel free to reach us at our free support forum.