# Hợp nhất các tệp PPSM qua C ++

> Mã ví dụ C ++ để kết hợp các tài liệu PPSM trên Môi trường thời gian chạy C ++ cho Windows 32 bit, Windows 64 bit và Linux 64 bit.

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



## Cách hợp nhất tệp PPSM bằng C ++

 Để hợp nhất tệp PPSM, chúng tôi sẽ sử dụng
 [Aspose.Slides dành cho C ++](https://products.aspose.com/slides/vi/cpp/)
 API là một API hợp nhất tài liệu giàu tính năng, mạnh mẽ và dễ sử dụng cho nền tảng C ++. Bạn có thể tải xuống phiên bản mới nhất của nó trực tiếp, chỉ cần mở
 [NuGet](https://www.nuget.org/packages/aspose.slides)
 quản lý gói, tìm kiếm
 ** Aspose.Slides.Cpp **
 và cài đặt. Bạn cũng có thể sử dụng lệnh sau từ Bảng điều khiển Trình quản lý Gói.

### Yêu cầu

```cs

PM> Install-Package Aspose.Slides.Cpp

```

## Các bước để hợp nhất tệp PPSM trong C ++

Việc hợp nhất và nối tài liệu cơ bản với API [Aspose.Slides for C ++](https://products.aspose.com/slides/vi/cpp/) có thể được thực hiện chỉ với vài dòng mã.

Tải cả hai tệp PPSM.

Sử dụng phương thức get \ _Slides () để lặp qua từng trang trình bày.

Sử dụng chức năng AddClone để hợp nhất với tệp mong muốn.

Sử dụng phương thức Save () để lưu tại đường dẫn được chỉ định

## yêu cầu hệ thống

 Aspose.Slides for C ++ hỗ trợ trên tất cả các nền tảng và Hệ điều hành chính. Vui lòng đảm bảo rằng bạn có các điều kiện tiên quyết sau.

- Microsoft Windows hoặc hệ điều hành tương thích với C ++ Runtime Environment dành cho Windows 32 bit, Windows 64 bit và Linux 64 bit.
- Aspose.Slides cho C ++ DLL được tham chiếu trong dự án của bạn.

### Hợp nhất các tệp PPSM - C ++

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

// 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::Ppsm);

```

## Giới thiệu về Aspose.Slides cho C ++ API

 API Aspose.Slides có thể được sử dụng để đọc, viết, thao tác và chuyển đổi tài liệu Microsoft PowerPoint sang PDF, XPS, HTML, TIFF, ODP và nhiều định dạng khác. Người ta có thể tạo các tệp mới từ đầu và lưu chúng ở các định dạng được hỗ trợ có liên quan. Aspose.Slides là một API độc lập để tạo, phân tích cú pháp hoặc thao tác với các bản trình bày, trang trình bày và các phần tử và nó không phụ thuộc vào bất kỳ phần mềm nào như Microsoft hoặc OpenOffice.

Files with PPSM extension represent Macro-enabled Slide Show file format created with Microsoft PowerPoint 2007 or higher. Another similar file format is PPTM which differs in opening with Microsoft PowerPoint in editable format instead of running as Slide Show. When run as slide show, the PPSM file shows the presentation slides with contents intact in the slide show and is in read-only mode by default. PPSM files can still be edited in Microsoft PowerPoint by opening it in PowerPoint.

## Các định dạng hợp nhất được hỗ trợ khác

- [ODP](https://products.aspose.com/slides/vi/cpp/merger/odp/) — Định dạng bản trình bày OpenDocument
- [OTP](https://products.aspose.com/slides/vi/cpp/merger/otp/) — Định dạng chuẩn OpenDocument
- [POT](https://products.aspose.com/slides/vi/cpp/merger/pot/) — Tệp mẫu Microsoft PowerPoint
- [POTM](https://products.aspose.com/slides/vi/cpp/merger/potm/) — Tệp Mẫu Microsoft PowerPoint
- [POTX](https://products.aspose.com/slides/vi/cpp/merger/potx/) — Bản trình bày mẫu Microsoft PowerPoint
- [PPS](https://products.aspose.com/slides/vi/cpp/merger/pps/) — Trình chiếu PowerPoint
- [PPSX](https://products.aspose.com/slides/vi/cpp/merger/ppsx/) — Trình chiếu PowerPoint
- [PPT](https://products.aspose.com/slides/vi/cpp/merger/ppt/) — Microsoft PowerPoint 97-2003
- [PPTM](https://products.aspose.com/slides/vi/cpp/merger/pptm/) — Tệp trình bày hỗ trợ macro
- [PPTX](https://products.aspose.com/slides/vi/cpp/merger/pptx/) — Định dạng bản trình bày XML mở
