Skip to end of metadata
Go to start of metadata
Contents Summary
 

The code sample in below examples uses some methods defined in Working with Common Utilities.

Handling Metadata in MS Project Document

GroupDocs Metadata API also supports reading metadata attached to MS Project document. Following are some basic features provided by the API.

Reading Metadata in MS Project Document

To access Metadata in MS Project Document, GroupDocs.Metadata API provides MppFormat.GetProperties() function which returns all metadata properties. Following are the steps to read metadata:

  1. Initialize MppFormat object
  2. Get metadata using MppFormat.GetProperties() in MppMetadata object

Following code snippet updates the metadata of MS Project file. 

Updating Metadata in MS Project Document

This feature is supported by version 18.6 or greater.

Following are the steps to update metadata:

  1. Initialize MppFormat object
  2. Update metadata properties e.g Author using MppFormat.ProjectInfo.Author = "John Smith"

Following code snippet updates metadata of MS Project file. 

Updating Metadata in MS Project Document using Stream

This feature is supported by version 18.6 or greater.

For better performance, you can work with MS Project Document using a Stream. Following are the steps to update metadata using stream:

  1. Initialize Stream
  2. Initialize MppFormat object
  3. Update metadata properties e.g Author using MppFormat.ProjectInfo.Author = "John Smith"

Following code snippet updates metadata of MS Project file using stream. 

Cleaning Metadata in MS Project Document

This feature is supported by version 18.6 or greater.

Following are the steps to clean metadata:

  1. Initialize MppFormat object
  2. Clean metadata using MppFormat.CleanMetadata()
  3. Commit changes using MppFormat.Save()

Following code snippet cleans metadata of MS Project file. 

Download Sample File

You can download sample image used in this article.

Following is the path of sample file used in code sample:

Labels
  • No labels