# C++ を使用して PPSM ファイルのメタデータを表示または編集する

> C++ ソース コードで、PPSM 形式のメタデータを編集または表示できます。

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



## C++ 経由で PPSM プロパティを変更します

Aspose.Slides for C++ を使用すると、開発者は組み込みプロパティとカスタム プロパティの値にアクセスして変更できます。開発者は、プレゼンテーション オブジェクトによって公開される [DocumentProperties](https://reference.aspose.com/slides/cpp/aspose.slides/documentproperties/) プロパティを使用して、プレゼンテーション ファイルのドキュメント プロパティにアクセスできます。

### PPSM 組み込みプロパティの変更 - C++

```cpp

// Instantiate the Presentation class that represents the Presentation
System::SharedPtr<Presentation> presentation = System::MakeObject<Presentation>(u"presentation.ppsm");

// 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.ppsm", SaveFormat::Ppsm);
```

### カスタム プロパティを PPSM - 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.ppsm", SaveFormat::Ppsm);
```

## C++ 経由で PPSM のメタデータを抽出する方法

これらは、PPSM ファイルからメタデータを抽出する手順です。

PPSM ファイルへのパスを使用してプレゼンテーション クラスをインスタンス化する

プレゼンテーションに関連付けられた DocumentProperties オブジェクトを取得する

DocumentProperties オブジェクト内のアイテムをループする

カスタム プロパティへのアクセスと変更

## サポートされているその他のメタデータ形式
