# C++を介してPOTXファイルをマージする

> Windows 32ビット、Windows 64ビット、およびLinux64ビット用のC++ランタイム環境でPOTXドキュメントを組み合わせるためのC++サンプルコード。

Source: https://products.aspose.com/slides/ja/cpp/merger/potx/
Updated: 2026-08-11



## C++を使用してPOTXファイルをマージする方法

 POTXファイルをマージするために、
 [Aspose.Slides for C ++](https://products.aspose.com/slides/cpp)
 機能が豊富で強力で使いやすいC++プラットフォーム用のドキュメントマージAPIであるAPI。最新バージョンを直接ダウンロードできます。開くだけです。
 [NuGet](https://www.nuget.org/packages/aspose.slides)
 パッケージマネージャー、検索
 ** Aspose.Slides.Cpp **
 とインストールします。パッケージマネージャーコンソールから次のコマンドを使用することもできます。

### 指示

```cs

PM> Install-Package Aspose.Slides.Cpp

```

## C++でPOTXファイルをマージする手順

[Aspose.Slides for C ++](https://products.aspose.com/slides/cpp)APIとマージおよび連結する基本的なドキュメントは、わずか数行のコードで実行できます。

両方のPOTXファイルをロードします。

get \ _Slides（）メソッドを使用して、各スライドを反復処理します。

AddClone関数を使用して、目的のファイルとマージします。

Save（）メソッドを使用して、指定したパスに保存します

## システム要求

 Aspose.Slides for C ++は、すべての主要なプラットフォームとオペレーティングシステムでサポートされています。次の前提条件があることを確認してください。

-MicrosoftWindowsまたはWindows32ビット、Windows 64ビット、Linux64ビット用のC++ランタイム環境と互換性のあるOS。
-プロジェクトで参照されているC++DLLのAspose.Slides。

### POTXファイルのマージ-C++

```cs
// The path to the documents directory.
const String sourceFilePath1 = u"SourceFile2.potx";
const String sourceFilePath2 = u"SourceFile3.potx";
const String outputFilePath = u"mergedOutput.potx";

// Instantiate Presentation class
SharedPtr<Presentation> presentation1 = MakeObject<Presentation>(sourceFilePath1);
SharedPtr<Presentation> presentation2 = MakeObject<Presentation>(sourceFilePath2);

for (SharedPtr<ISlide> slide : presentation2->get_Slides()){
	// Merge from source to destination
	presentation1->get_Slides()->AddClone(slide);
}

// Save the presentation
presentation1->Save(outputFilePath, SaveFormat::Potx);

```

## Aspose.Slides for C++APIについて

 Aspose.Slides APIを使用して、Microsoft PowerPointドキュメントの読み取り、書き込み、操作、およびPDF、XPS、HTML、TIFF、ODP、その他のさまざまな形式への変換を行うことができます。新しいファイルを最初から作成し、サポートされている関連する形式で保存できます。 Aspose.Slidesは、プレゼンテーション、スライド、要素を作成、解析、または操作するためのスタンドアロンAPIであり、MicrosoftやOpenOfficeなどのソフトウェアに依存しません。

Files with .POTX extension represent Microsoft PowerPoint template presentations that are created with Microsoft PowerPoint 2007 and above. This format was created to replace the POT file format that is based on the binary file format and is supported with PowerPoint 97-2003. The files generated can be used to create presentations that have same layout and other settings required to be applied to new files. These settings can include styles, backgrounds, colour palette, fonts and defaults. Such files are generated in order to create ready-to-use template files for official use.

## その他のサポートされているマージ形式

- [ODP](https://products.aspose.com/slides/cpp/merger/odp/) — OpenDocumentプレゼンテーション形式
- [OTP](https://products.aspose.com/slides/cpp/merger/otp/) — OpenDocument標準フォーマット
- [POT](https://products.aspose.com/slides/cpp/merger/pot/) — MicrosoftPowerPointテンプレートファイル
- [POTM](https://products.aspose.com/slides/cpp/merger/potm/) — MicrosoftPowerPointテンプレートファイル
- [PPS](https://products.aspose.com/slides/cpp/merger/pps/) — PowerPointのスライドショー
- [PPSM](https://products.aspose.com/slides/cpp/merger/ppsm/) — マクロ対応のスライドショー
- [PPSX](https://products.aspose.com/slides/cpp/merger/ppsx/) — PowerPointのスライドショー
- [PPT](https://products.aspose.com/slides/cpp/merger/ppt/) — Microsoft PowerPoint 97-2003
- [PPTM](https://products.aspose.com/slides/cpp/merger/pptm/) — マクロ対応のプレゼンテーションファイル
- [PPTX](https://products.aspose.com/slides/cpp/merger/pptx/) — XMLプレゼンテーション形式を開く
