# Просмотр или редактирование метаданных файлов PPTM с помощью C++

> Исходный код C++ для редактирования или просмотра метаданных формата PPTM.

Source: https://products.aspose.com/slides/ru/cpp/metadata/pptm/
Updated: 2023-04-25



## Измените свойства PPTM через C++

Используя Aspose.Slides for C++, разработчики могут получать доступ и изменять значения как встроенных, так и пользовательских свойств. Разработчики могут использовать свойство [DocumentProperties](https://reference.aspose.com/slides/cpp/aspose.slides/documentproperties/), предоставляемое объектом Presentation, для доступа к свойствам документа файла презентации.

### Изменить встроенные свойства PPTM – C++

```cpp

// 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);
```

### Добавить пользовательские свойства в PPTM – C++

```cpp

// 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);
```

## Как извлечь метаданные PPTM через C++

Это шаги для извлечения метаданных из файлов PPTM.

Создайте экземпляр класса Presentation с путем к файлу PPTM

Получить объект DocumentProperties, связанный с презентацией

Перебрать элементы в объекте DocumentProperties

Доступ и изменение пользовательских свойств

## Другие поддерживаемые форматы метаданных
