Back to Devexpress

Obtain and Change Presentation Document Properties with the DevExpress Presentation API Library

officefileapi-405429-presentation-api-obtain-change-document-properties.md

latest6.2 KB
Original Source

Obtain and Change Presentation Document Properties with the DevExpress Presentation API Library

  • Nov 07, 2025
  • 2 minutes to read

Document properties are metadata stored in a presentation. The DevExpress Presentation API library allows you to obtain or specify this metadata.

The Presentation.DocumentProperties property obtains all document properties. You can specify built-in and custom document properties.

Obtain or Specify Built-In Document Properties

The DocumentProperties class contains built-in properties. The table below lists available properties:

PropertyUpdates AutomaticallyRead Only
ApplicationNoNo
AuthorNoNo
CategoryNoNo
CompanyNoNo
ContentStatusNoNo
CreatedYesNo
DescriptionNoNo
DocumentRevisionNoNo
DocumentVersionNoNo
HiddenSlidesNoYes
KeywordsNoNo
LastModifiedByYesNo
ModifiedYesNo
NotesNoYes
PresentationFormatNoYes
PrintedYesNo
SecurityNoYes
SlidesNoYes
SubjectNoNo
TitleNoNo
VersionNoNo

The following code snippet specifies document properties:

csharp
using DevExpress.Docs.Presentation;
//...
using (var presentation = new Presentation(File.ReadAllBytes("C:\\Documents\\Presentation.pptx")))
{
    var documentProperties = presentation.DocumentProperties;
    documentProperties.Author = "Jane Doe";
    documentProperties.Title = " Innovating for the Future: Trends in Sustainable Technology";
    documentProperties.Company = "GreenTech Solutions Inc.";
    documentProperties.Keywords = "Sustainability, Green Technology, Innovation, Future Trends, Eco-Friendly Solutions";

    presentation.SaveDocument(new FileStream("C:\\Documents\\Presentation_upd.pptx", FileMode.Create));
}
vb
Imports DevExpress.Docs.Presentation
'...
Using presentation = New Presentation(File.ReadAllBytes("C:\Documents\Presentation.pptx"))
  Dim documentProperties = presentation.DocumentProperties
  documentProperties.Author = "Jane Doe"
  documentProperties.Title = " Innovating for the Future: Trends in Sustainable Technology"
  documentProperties.Company = "GreenTech Solutions Inc."
  documentProperties.Keywords = "Sustainability, Green Technology, Innovation, Future Trends, Eco-Friendly Solutions"

  presentation.SaveDocument(New FileStream("C:\Documents\Presentation_upd.pptx", FileMode.Create))
End Using

Obtain or Specify Custom Document Properties

The DocumentProperties.CustomProperties property allows you to specify custom document properties. Call the Add method to add a new custom property:

The following code snippet creates new custom properties:

csharp
using DevExpress.Docs.Presentation;

using (var presentation = new Presentation(File.ReadAllBytes("C:\\Documents\\Presentation.pptx")))
{
    var customProperties = presentation.DocumentProperties.CustomProperties;
    customProperties.Add("string property", "string");
    customProperties.Add("boolean property", true);
    customProperties.Add("date property", DateTime.Now);
    customProperties.Add("int property", 5);
    customProperties.Add("double property", 2.55);

    presentation.SaveDocument(new FileStream("C:\\Documents\\Presentation_upd.pptx", FileMode.Create));
}
vb
Imports DevExpress.Docs.Presentation

Using presentation = New Presentation(File.ReadAllBytes("C:\Documents\Presentation.pptx"))
  Dim customProperties = presentation.DocumentProperties.CustomProperties
  customProperties.Add("string property", "string")
  customProperties.Add("boolean property", True)
  customProperties.Add("date property", Date.Now)
  customProperties.Add("int property", 5)
  customProperties.Add("double property", 2.55)

  presentation.SaveDocument(New FileStream("C:\Documents\Presentation_upd.pptx", FileMode.Create))
End Using