Access or Modify Properties of PowerPoint Files using C#

Document Properties in PowerPoint C#

The document properties or metadata in PowerPoint files are used for identification of the presentations. Moreover, they provide additional information about the presentation such as author, title, keywords, subject, etc. In this article, you will learn how to access or modify the properties in PowerPoint files programmatically using C#.

.NET API to Access/Modify Properties in PowerPoint Files

To access or modify the built-in or custom document properties, we will use Aspose.Slides for .NET. It is a powerful API for creating and manipulating PowerPoint and OpenOffice documents. The API is available as a downloadable DLL as well as on NuGet.

PM> Install-Package Aspose.Slides.NET

Types of Properties in PowerPoint Presentations

The PowerPoint presentations support two types of document properties: built-in and custom. The built-in properties provide general information about the presentations such as title, author, subject, etc. Whereas, the custom properties are defined by the users in the form of key/value pairs. The following sections demonstrate how to add, access, and modify properties belonging to each of the above-mentioned types.

Access Built-in Properties in PowerPoint Presentations using C#

The following are the steps to access the built-in properties in PowerPoint presentations using C#.

The following code sample shows how to access built-in properties in PowerPoint presentations.

Modify Built-in Properties in PowerPoint Presentations using C#

The following are the steps to modify the values of the built-in properties in PowerPoint presentations using C#.

The following code sample shows how to modify the built-in properties in PowerPoint Presentations.

Add Custom Properties in PowerPoint Presentations using C#

The following are the steps to add custom properties in a PowerPoint presentation using C#.

The following code sample shows how to add custom properties in a PowerPoint presentation.

Access Custom Properties in PowerPoint Presentations using C#

The following steps demonstrate how to access the custom properties in a PowerPoint Presentation using C#.

The following code sample shows how to access custom properties in a PowerPoint Presentation.

Modify Custom Properties in PowerPoint Presentations using C#

The following are the steps to modify the custom properties in a PowerPoint presentation.

The following code sample shows how to modify a custom property in a PowerPoint presentation.

Get a Free API License

You can use Aspose.Slides for .NET without evaluation limitations by requesting a temporary license.

Online Demo

You can also try the online tool to view and edit document properties in presentations, which is based on Aspose.Slides.

You may also want to try out Aspose free online PowerPoint editor.

Conclusion

In this article, you have learned how to add, access, and modify document properties in PowerPoint presentations using C#. The article has covered the manipulation of built-in and custom document properties explicitly. In addition, you can visit the documentation to explore more about Aspose.Slides for .NET. Also, you can post your queries to our forum.

See Also