# Merge POT Files using Java

> Merge POT files in Java. Use Aspose.Slides for Java to combine POT presentation templates and save the merged file.

Source: https://products.aspose.com/slides/java/merger/pot/
Updated: 2026-08-11



## Merge POT Files Using Java

Use [Aspose.Slides for Java](/slides/java/) to load multiple `POT` presentations, clone slides from one presentation into another, and save the merged file. You can install the `aspose-slides` package in a Maven-based project by adding the repository and dependency below.

### Repository

```xml
<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://releases.aspose.com/java/repo/</url>
</repository>
```

### Dependency

```xml
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-slides</artifactId>
    <version>version of aspose-slides API</version>
    <classifier>jdk17</classifier>
</dependency>
```

## Steps for Merging POT Files in Java

A basic document merge with [Aspose.Slides for Java](/slides/java/) APIs can be done with just a few lines of code.

Load the destination `POT` file with the `Presentation` class.

Load the source `POT` file with the `Presentation` class.

Loop through the `ISlide` objects in the source presentation.

Call `addClone` to add each source slide to the destination presentation.

Call the `save` method with `SaveFormat.Pot`.

## System Requirements

Before running the Java merge sample code, make sure that you have the following prerequisites.

- Microsoft Windows, Linux, macOS, or another OS with a supported Java Runtime Environment.
- Get the latest version of Aspose.Slides for Java from Maven.

### Merge POT Files - Java

```java
Presentation destinationPresentation = new Presentation("presentation1.pot");
try {
    Presentation sourcePresentation = new Presentation("presentation2.pot");
    try {
        for (ISlide slide : sourcePresentation.getSlides()) {
            destinationPresentation.getSlides().addClone(slide);
        }
    } finally {
        sourcePresentation.dispose();
    }

    destinationPresentation.save("merged-presentation.pot", SaveFormat.Pot);
} finally {
    destinationPresentation.dispose();
}
```

## About Aspose.Slides for Java API

Aspose.Slides for Java can read, write, manipulate, merge, and convert Microsoft PowerPoint and OpenDocument presentations to formats such as `PDF`, `XPS`, `HTML`, `TIFF`, and `ODP`. It is a standalone API and does not require Microsoft PowerPoint or OpenOffice.

Files with the `.POT` extension represent Microsoft PowerPoint template files created by PowerPoint 97-2003. A `POT` file can store layouts, themes, styles, backgrounds, fonts, and default settings used to create new presentations.

## Other Supported Merging Formats

- [ODP](/slides/java/merger/odp/) — OpenDocument Presentation Format
- [OTP](/slides/java/merger/otp/) — OpenDocument Presentation Template
- [POTM](/slides/java/merger/potm/) — PowerPoint Macro-Enabled Template
- [POTX](/slides/java/merger/potx/) — PowerPoint Template
- [PPS](/slides/java/merger/pps/) — PowerPoint Slide Show
- [PPSM](/slides/java/merger/ppsm/) — Macro-enabled Slide Show
- [PPSX](/slides/java/merger/ppsx/) — PowerPoint Slide Show
- [PPT](/slides/java/merger/ppt/) — PowerPoint 97-2003 Presentation
- [PPTM](/slides/java/merger/pptm/) — Macro-enabled Presentation File
- [PPTX](/slides/java/merger/pptx/) — Open XML Presentation Format
