PPT PPTX ODP POT ppsx
Aspose.Slides  for .NET
PPTM

Edit PPTM properties using C#

Build your own .NET apps to modify Built-in and Custom properties in presentation files using server-side APIs.

Modify PPTM Properties via C#

Using Aspose.Slides for .NET, developers can access and modify the values of built-in properties as well as custom properties. Developers can use DocumentProperties property exposed by Presentation object to access the document properties of the presentation file.

Modify PPTM Built-in Properties - C#


// Instantiate the Presentation class that represents the Presentation
Presentation presentation = new Presentation("presentation.pptm");

// Create a reference to IDocumentProperties object associated with Presentation
IDocumentProperties documentProperties = presentation.DocumentProperties;

// Set the builtin properties
documentProperties.Author = "Aspose.Slides for .NET";
documentProperties.Title = "Modifying Presentation Properties";
documentProperties.Subject = "Aspose Subject";
documentProperties.Comments = "Aspose Description";
documentProperties.Manager = "Aspose Manager";

// Save your presentation to a file
presentation.Save("DocumentProperties_out.pptm", SaveFormat.Pptm);

Add Custom Properties to PPTM - C#


// Instantiate the Presentation class
Presentation presentation = new Presentation();

// Getting Document Properties
IDocumentProperties documentProperties = presentation.DocumentProperties;

// Adding Custom properties
documentProperties["New Custom"] = 12;
documentProperties["My Name"] = "Aspose Metadata Editor";
documentProperties["Custom"] = 124;

// Getting property name at particular index
String getPropertyName = documentProperties.GetCustomPropertyName(2);

// Removing selected property
documentProperties.RemoveCustomProperty(getPropertyName);

// Save your presentation to a file
presentation.Save("CustomDocumentProperties_out.pptm", SaveFormat.Pptm);

How to Extract Metadata of PPTM via C#

These are the steps to Extract Metadata from PPTM files.

  1. Instantiate the Presentation class with path to PPTM file

  2. Get DocumentProperties object associated with Presentation

  3. Loop over the items in DocumentProperties object

  4. Access and modify custom properties

Other Supported Metadata Formats

Using C#, You can also manipulate metadata of many other formats including.