# Wyświetl lub edytuj metadane plików POTX za pomocą Python

> Kod źródłowy Python, aby edytować lub przeglądać metadane formatu POTX.

Source: https://products.aspose.com/slides/pl/python-net/metadata/potx/
Updated: 2023-04-25



## Zmodyfikuj właściwości POTX za pomocą Python

Korzystając z Aspose.Slides for Python via .NET, programiści mogą uzyskiwać dostęp i modyfikować wartości właściwości wbudowanych oraz właściwości niestandardowych. Deweloperzy mogą użyć właściwości [DocumentProperties](https://reference.aspose.com/slides/python-net/aspose.slides/documentproperties/) udostępnionej przez obiekt prezentacji, aby uzyskać dostęp do właściwości dokumentu w pliku prezentacji.

### Zmodyfikuj wbudowane właściwości POTX – Python

```py

import aspose.slides as slides

# Instantiate the Presentation class that represents the Presentation
with slides.Presentation(path + "ModifyBuiltinProperties.potx") 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.potx", slides.export.SaveFormat.POTX)
```

### Dodaj niestandardowe właściwości do POTX – Python

```py

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.potx", slides.export.SaveFormat.POTX)
```

## Jak wyodrębnić metadane POTX przez Python

Oto kroki, aby wyodrębnić metadane z plików POTX.

Utwórz instancję klasy Presentation ze ścieżką do pliku POTX

Pobierz obiekt DocumentProperties powiązany z prezentacją

Zapętl elementy w obiekcie DocumentProperties

Uzyskaj dostęp do właściwości niestandardowych i modyfikuj je

## Inne obsługiwane formaty metadanych
