Update Built-In Properties in .NET Project Management Documents

Introduction

In this tutorial, we’ll explore how to update built-in properties within .NET project management documents using GroupDocs.Metadata for .NET. This library enables efficient manipulation of metadata for various file formats, including project management documents like Microsoft Project (MPP) files.

Prerequisites

Before diving into the steps below, ensure you have the following prerequisites:

  • Visual Studio installed on your machine.
  • Basic understanding of C# and .NET development.
  • GroupDocs.Metadata for .NET library. You can download it here.
  • Access to a development environment.

Import Namespaces

Begin by importing the necessary namespaces into your C# project:

using System;
using GroupDocs.Metadata;
using GroupDocs.Metadata.Formats.Document;

Step 1: Load the Document Metadata

First, instantiate a Metadata object with the path to your input file:

using (Metadata metadata = new Metadata("YourInputFile"))
{
    var root = metadata.GetRootPackage<ProjectManagementRootPackage>();
    // Access the document properties
}

Step 2: Update Document Properties

Now, update the desired built-in properties of the project management document:

root.DocumentProperties.Author = "test author";
root.DocumentProperties.CreationDate = DateTime.Now;
root.DocumentProperties.Company = "GroupDocs";
root.DocumentProperties.Comments = "test comment";
root.DocumentProperties.Keywords = "metadata, built-in, update";
// Add more properties as needed

Step 3: Save the Modified Metadata

After making the necessary changes, save the updated metadata back to the file:

metadata.Save("YourInputFile");

Conclusion

In this tutorial, we covered how to update built-in properties within project management documents using GroupDocs.Metadata for .NET. Leveraging this library, developers can efficiently manipulate metadata, enhancing document management capabilities within .NET applications.

FAQ’s

Is GroupDocs.Metadata compatible with various project management file formats?

Yes, GroupDocs.Metadata supports popular project management formats like MPP (Microsoft Project) files.

Can I manipulate other metadata properties beyond built-in document details?

Absolutely! GroupDocs.Metadata offers extensive capabilities to manage metadata across a wide range of file types.

Where can I find additional documentation and support for GroupDocs.Metadata?

Visit the GroupDocs.Metadata documentation for detailed information. For specific queries, engage with the community at the GroupDocs forum.

Is there a free trial available to test GroupDocs.Metadata?

Yes, you can access a free trial here.

How can I obtain a temporary license for GroupDocs.Metadata?

Obtain a temporary license here.