# Repeat template slides by ID

1. You can repeat a template slide using the slide's unique identifier to create multiple copies as needed.
2. Using `slide_id` ensures the correct slide is referenced even if the slide order or structure changes within the template.

### Finding the ID of a slide:

* Programmaticall&#x79;**:**&#x20;
  * using VBA or any library capable of reading PowerPoint XML (e.g., `python-pptx`).
* Manually:
  * Rename the `.pptx` file to `.zip`.
  * Open the ZIP and navigate to `ppt/presentation.xml`.
  * Inside, look for the `<p:sldIdLst>` section, each `<p:sldId>` element has an `id` attribute that represents the slide’s unique ID.

<figure><img src="https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2FJWToxssac5tiCsr3UuDC%2Fimage_2025-10-12_143846466.png?alt=media&#x26;token=b2ed8aaf-1862-45e1-bfb3-328737be1bd1" alt=""><figcaption></figcaption></figure>

Reference: [slides](https://docs.powerpointgeneratorapi.com/json-template-syntax/slides "mention")

Download: [input.zip](https://drive.google.com/uc?export=download\&id=1zA8cXcsD5A-wkk29CzUfyUX_vgc3QgLI) | [output.pptx](https://drive.google.com/uc?export=download\&id=1ybUoTvnijzpmq0CUFgLw8IuvmvGGKrhG)

{% columns %}
{% column width="41.66666666666667%" %}

<figure><img src="https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2Ftl9lpFpu0KAqcq3YkE9c%2Ftemplate.png?alt=media&#x26;token=126ff920-24a5-448c-b478-cb820572edd9" alt=""><figcaption></figcaption></figure>

***

<figure><img src="https://1155212587-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mgoqdluo05I2RXHZpTr-887967055%2Fuploads%2FAFISxuheDryXS9Ka2L2e%2Foutput.png?alt=media&#x26;token=7f12e084-9b53-4b06-9a0e-5be98a99f825" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column width="58.33333333333333%" %}
{% code lineNumbers="true" %}

```json
{
  "presentation": {
    "template": "template.pptx",
    "slides": [
      {
        "slide_id": 265
      }
    ]
  }
}
```

{% endcode %}
{% endcolumn %}
{% endcolumns %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.powerpointgeneratorapi.com/examples/slide/repeat-template-slides-by-id.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
