C++ で PPS のメタデータを編集

Aspose.Slides for C++ を使用して、プレゼンテーション ファイルの組み込みプロパティとカスタム プロパティを表示、更新します。

C++ で PPS のプロパティを変更

Aspose.Slides for C++ を使用すると、Microsoft PowerPoint なしで PPS ファイルのメタデータを読み取り、更新できます。Presentation::get_DocumentProperties が返す DocumentProperties オブジェクトを使用して、Author や Title などの組み込みプロパティを変更したり、idx_set、GetCustomPropertyName、RemoveCustomProperty でカスタム プロパティを管理したりできます。

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

auto presentation = MakeObject<Presentation>(u"presentation.pps");
auto documentProperties = presentation->get_DocumentProperties();

documentProperties->set_Author(u"New Author");
documentProperties->set_Title(u"New Title");

presentation->Save(u"updated-presentation.pps", SaveFormat::Pps);
presentation->Dispose();

PPS へのカスタム プロパティの追加 - C++

auto presentation = MakeObject<Presentation>(u"presentation.pps");
auto documentProperties = presentation->get_DocumentProperties();

documentProperties->idx_set(u"Department", ObjectExt::Box<String>(u"Sales"));
documentProperties->idx_set(u"Project", ObjectExt::Box<String>(u"Metadata Update"));
documentProperties->idx_set(u"Revision", ObjectExt::Box<int32_t>(3));

auto customPropertyName = documentProperties->GetCustomPropertyName(2);
documentProperties->RemoveCustomProperty(customPropertyName);

presentation->Save(u"updated-custom-properties.pps", SaveFormat::Pps);
presentation->Dispose();

C++ で PPS のメタデータを表示または編集する方法

次の手順に従って、PPS のメタデータを表示または編集します。

  1. Presentation クラスで PPS ファイルを読み込みます。
  2. get_DocumentProperties で DocumentProperties オブジェクトを取得します。
  3. Author や Title などの組み込みプロパティを読み取るか更新します。
  4. idx_set、GetCustomPropertyName、RemoveCustomProperty でカスタム プロパティを追加、読み取り、削除します。

Aspose.Slides で構築

PPS のメタデータをオンラインで表示、編集

無料の Aspose.Slides Metadata アプリは、上記のコードと同じ API である Aspose.Slides for C++ で構築されています。アプリを開いて、ご自身の PPS ファイルで API に何ができるかをお確かめください。

  • ブラウザーで動作し、インストールは不要です。
  • コードを書く前に、Aspose.Slides がプロパティをどう読み書きするかを確認できます。
  • PPS ファイルの組み込みプロパティとカスタム プロパティを表示、編集できます。
  • 更新したファイルを保存してダウンロードできます。

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

C++ では次の形式のメタデータも管理できます。