PPT
PPTX
ODP
POT
ppsx
PPTM
Edit PPTM properties using C++
Build your own C++ apps to modify Built-in and Custom properties in presentation files using server-side APIs.
Modify PPTM Properties via C++
Using Aspose.Slides for C++, 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
System::SharedPtr<Presentation> presentation = System::MakeObject<Presentation>(u"presentation.pptm");
// Create a reference to IDocumentProperties object associated with Presentation
System::SharedPtr<IDocumentProperties> documentProperties = presentation->get_DocumentProperties();
// Set the builtin properties
documentProperties->set_Author(u"New Author");
documentProperties->set_Title(u"New Title");
// Save your presentation to a file
presentation->Save(u"DocumentProperties_out.pptm", SaveFormat::Pptm);
Add Custom Properties to PPTM - C++
// Instantiate the Presentation class
auto presentation = System::MakeObject<Presentation>();
// Getting Document Properties
auto documentProperties = presentation->get_DocumentProperties();
// Adding Custom properties
documentProperties->idx_set(u"New Custom", ObjectExt::Box<int32_t>(12));
documentProperties->idx_set(u"My Name", ObjectExt::Box<String>(u"Aspose Metadata Editor"));
documentProperties->idx_set(u"Custom", ObjectExt::Box<int32_t>(124));
// Getting property name at particular index
String getPropertyName = documentProperties->GetCustomPropertyName(2);
// Removing selected property
documentProperties->RemoveCustomProperty(getPropertyName);
// Saving presentation
presentation->Save(u"CustomDocumentProperties_out.pptm", SaveFormat::Pptm);
How to Extract Metadata of PPTM via C++
These are the steps to Extract Metadata from PPTM files.
Instantiate the Presentation class with path to PPTM file
Get DocumentProperties object associated with Presentation
Loop over the items in DocumentProperties object
Access and modify custom properties