PPT
PPTX
ODP
POT
ppsx
PPT
Edit PPT properties using Python
Build your own Python apps to modify Built-in and Custom properties in presentation files using server-side APIs.
Modify PPT Properties via Python
Using Aspose.Slides for Python via .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 PPT Built-in Properties - Python
import aspose.slides as slides
# Instantiate the Presentation class that represents the Presentation
with slides.Presentation(path + "ModifyBuiltinProperties.ppt") as presentation:
# Create a reference to object associated with Presentation
documentProperties = presentation.document_properties
# Set the builtin properties
documentProperties.author = "Aspose.Slides for Python"
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.ppt", slides.export.SaveFormat.PPT)
Add Custom Properties to PPT - Python
import aspose.slides as slides
# Instantiate the Presentation class
with slides.Presentation() as presentation:
# Getting Document Properties
documentProperties = presentation.document_properties
# Adding Custom properties
documentProperties.set_custom_property_value("New Custom", 12)
documentProperties.set_custom_property_value("My Nam", "Aspose Metadata Editor")
documentProperties.set_custom_property_value("Custom", 124)
# Getting property name at particular index
getPropertyName = documentProperties.get_custom_property_name(2)
# Removing selected property
documentProperties.remove_custom_property(getPropertyName)
# Saving presentation
presentation.save("CustomDocumentProperties_out.ppt", slides.export.SaveFormat.PPT)
How to Extract Metadata of PPT via Python
These are the steps to Extract Metadata from PPT files.
Instantiate the Presentation class with path to PPT file
Get DocumentProperties object associated with Presentation
Loop over the items in DocumentProperties object
Access and modify custom properties