File types · Explainer

The PPTM file (.pptm)

A PPTM file is a PowerPoint presentation that is allowed to contain VBA macros: the same ZIP package of XML as a PPTX, with room for a VBA project. This guide explains where the macros live, how they get to run in a presentation, how Office blocks them, how to inspect a file without running anything, and has free sample PPTM files, without macros, to download for testing.

At a glance

Full name
PowerPoint Macro-Enabled Presentation
Extensions
.pptm
MIME type
application/vnd.ms-powerpoint.presentation.macroEnabled.12
Kind
Binary: a ZIP package of XML parts (PresentationML), plus an optional binary VBA project
Standard
Office Open XML (ECMA-376, ISO/IEC 29500) for the slides; Microsoft's [MS-OFFMACRO2] and [MS-OVBA] for the macro parts
First released
2007, with PowerPoint 2007, by Microsoft
Opens with
PowerPoint (macros run on Windows and Mac), LibreOffice Impress
Magic number
50 4B 03 04 ("PK"), the ZIP signature
Main part content type
application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml
Macros
VBA only, in ppt/vbaProject.bin. Optional: a PPTM can have none

The basics

What is a PPTM file?

PPTM is the format PowerPoint uses for presentations that contain macros: programs written in VBA (Visual Basic for Applications) that are stored in the file. Macros in a deck typically build or reformat slides, update charts and text from other files, run quizzes and interactive buttons during a show, or export slides in bulk. If you add VBA code to a presentation, PowerPoint asks you to save it as a PowerPoint Macro-Enabled Presentation, with the extension .pptm.

It arrived with PowerPoint 2007, alongside PPTX. The old binary PPT format could hold macros under the same extension as any other deck. The XML formats separate them: a .pptx can't hold macros and a .pptm can, so people and mail filters can tell from the name that a file may contain code.

  • It's a PPTX plus room for code. Same package, same XML. The main part has a different content type, and the package may contain a VBA project.
  • Macro-enabled is a permission, not a promise. The extension says the file may contain macros. Our samples don't.
  • PowerPoint is a little different from Word and Excel. Its documented auto-run macros work only in add-ins, not in presentations, as explained below.

Our samples contain no macros

Every PPTM on this page is a macro-enabled package with no VBA project, safe to open. olevba reports "No VBA or XLM macros found" for each one.

Anatomy

What's inside a PPTM file

A PPTM is built like a PPTX: XML parts in a ZIP archive, linked by relationship files. Our sample-minimal.pptm has the same eleven parts as sample-minimal.pptx on the PPTX page and no macros. The last lines show what PowerPoint adds when a presentation does have macros; none of that is in our sample.

sample-minimal.pptm (file list and content types)
$ unzip -l sample-minimal.pptm
  Length  Name
     965  [Content_Types].xml
     301  _rels/.rels
     525  ppt/presentation.xml
     572  ppt/_rels/presentation.xml.rels
    1077  ppt/slides/slide1.xml
     310  ppt/slides/_rels/slide1.xml.rels
     514  ppt/slideLayouts/slideLayout1.xml
     310  ppt/slideLayouts/_rels/slideLayout1.xml.rels
    1314  ppt/slideMasters/slideMaster1.xml
     445  ppt/slideMasters/_rels/slideMaster1.xml.rels
    1982  ppt/theme/theme1.xml

First 4 bytes: 50 4b 03 04  (PK..)

[Content_Types].xml, the main part:
<Override PartName="/ppt/presentation.xml"
  ContentType="application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml"/>

ppt/presentation.xml:
<p:sldMasterIdLst><p:sldMasterId id="2147483648" r:id="rId1"/></p:sldMasterIdLst>

A .pptm that really has macros also contains (NOT in this sample):
  ppt/vbaProject.bin                the VBA project
  ppt/_rels/presentation.xml.rels   <Relationship Type="http://schemas.microsoft.com/office/2006/relationships/vbaProject" Target="vbaProject.bin"/>
  [Content_Types].xml               <Default Extension="bin" ContentType="application/vnd.ms-office.vbaProject"/>
  1. 150 4b 03 04

    The ZIP signature

    The same first bytes as every PPTX, DOCX and ZIP file. A tool has to open the package to learn that it's a presentation, and look further still to learn whether it has macros.

  2. 2ppt/slides/slide1.xml

    Ordinary slides

    Slides, layouts, masters and the theme are stored exactly as in a PPTX. Nothing about them changes when a presentation is macro-enabled.

  3. 3ContentType="application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml"

    The macro-enabled main part

    In a PPTX this says …presentationml.presentation.main+xml. This value makes the package a PPTM, and it's the only difference between our minimal PPTM and the minimal PPTX.

  4. 4<p:sldMasterId id="2147483648" …/>

    Slide master IDs

    [MS-OFFMACRO2] adds one rule to the presentation XML: in a macro-enabled presentation, every slide master entry must have its id attribute. PowerPoint writes it anyway, and so does our sample.

  5. 5ppt/vbaProject.bin

    The VBA project (not in our sample)

    Where the macros are: a binary OLE compound file, the container of the old PPT format, holding the compressed source code of each module. A package may contain only one.

  6. 6Type="http://schemas.microsoft.com/office/2006/relationships/vbaProject"

    The link to the macros

    The presentation part points to the VBA project with this relationship type, and the project has the content type application/vnd.ms-office.vbaProject. Readers find it through the relationship, not by its name.

Under the hood

How macros in a PowerPoint file get to run

Word and Excel have macros that run when a file opens, if macros are allowed, such as AutoOpen in Word and Workbook_Open in Excel. PowerPoint's VBA reference lists two automatic macros, Auto_Open and Auto_Close, and documents them for add-ins only: Auto_Open runs when PowerPoint loads a PPAM add-in that contains it, and Auto_Close when it unloads it. In a presentation, macros usually run because something starts them:

How a macro startsWhere it's set
From the Macros listDeveloper tab, Macros: pick a macro and choose Run. The Developer tab is hidden until you turn it on in File, Options, Customize Ribbon.
From a shape or buttonInsert, Action: a shape can "Run macro" on mouse click or on mouse over, which is how interactive shows and quizzes work.
From the VBA editorAlt+F11 opens the editor, where a developer runs and debugs code.
From an add-inRibbon buttons and Auto_Open in a loaded PPAM, which can then act on any open presentation.

No documented auto-open macro doesn't make a PPTM harmless. A shape that runs a macro on mouse over needs only a pointer passing over it during a show, and code can be tied to other events. Treat Enable Content in a presentation exactly as you would in a document.

Security

Will the macros run? PowerPoint's security checks

PowerPoint applies the same rules as Word and Excel. On Windows:

  • Protected View first. A presentation from the internet or an email opens read-only until you choose Enable Editing.
  • Mark of the Web. Since 2022, Office on Windows blocks VBA macros in files Windows has marked as coming from the internet, showing a red Security Risk banner with no way to enable them. Trusted Locations, signatures from trusted publishers and organisation policy are checked first; the DOCM page lists the order.
  • Otherwise, a yellow Security Warning bar with Enable Content.
  • To trust a file you need: close it, right-click it, choose Properties and tick Unblock, or run Unblock-File in PowerShell, then open it again.

The 2022 change doesn't affect PowerPoint for Mac, the mobile apps or PowerPoint for the web. The web version never runs VBA.

Presentations carry other risks that have nothing to do with macros, and apply to PPTX files too: action settings that start a program, embedded objects, and links. The PPTX page covers them.

Inspection

How to check a PPTM for macros without running them

  • List the parts. unzip -l deck.pptm, or rename a copy to .zip and open it. If there's no vbaProject.bin, there are no macros.
  • Run olevba from oletools, a free Python package (pip install oletools). It extracts the VBA source without running it and flags suspicious keywords. It's the same tool for PowerPoint, Word and Excel files.
  • In PowerPoint, open the file with macros disabled. Developer, Macros lists the macro names, and Alt+F11 shows the code. Neither runs anything.
olevba on our featured sample
$ olevba sample-presentation.pptm
olevba 0.60.2 on Python 3.13.16 - http://decalage.info/python/oletools
===============================================================================
FILE: sample-presentation.pptm
Type: OpenXML
No VBA or XLM macros found.

PowerPoint has no equivalent of Excel's Excel 4.0 macro sheets, and unlike Word it adds no extra XML part for its macros: in a PPTM, the VBA project is the only place PowerPoint keeps macros.

Comparison

PPTM and the other PowerPoint formats

PowerPoint has four macro-enabled XML formats. They differ only in the content type of ppt/presentation.xml and in what PowerPoint does when you open them.

ExtensionMacrosOpens asMain part content type
PPTXNoThe editor…presentationml.presentation.main+xml
PPTMYesThe editor…presentation.macroEnabled.main+xml
PPSMYesThe slide show…slideshow.macroEnabled.main+xml
POTMYesA new presentation based on it…template.macroEnabled.main+xml
PPAMYesNothing visible: it loads as an add-in…addin.macroEnabled.main+xml
PPTYesThe editorNone: binary OLE2 file

If your audience only needs to see the slides, send a PPTX or a PDF. Keep PPTM for decks whose macros are part of what they do, and macros you want in every presentation belong in an add-in.

How to

How to open, edit and convert a PPTM file

  • PowerPoint on Windows and Mac opens, edits and runs PPTM presentations.
  • LibreOffice Impress opens PPTM files, under its own macro security settings. It runs only part of Microsoft's VBA, so don't expect PowerPoint macros to work there.
  • Convert to PPTX: File, Save As, PowerPoint Presentation (.pptx). The VBA project isn't saved in the PPTX; keep the PPTM if you still need the code.
  • Convert to PDF: File, Export or Save As, PDF; on a server, soffice --headless --convert-to pdf deck.pptm. Converting doesn't run the macros.
  • From an old PPT with macros: open it, check Developer, Macros for macro names, and Save As PowerPoint Macro-Enabled Presentation. Microsoft suggests reopening it afterwards to check the macros still work.
  • In code: python-pptx opens PPTM files (its Presentation() accepts the PPTX and PPTM content types), but it can't read or write VBA. The Open XML SDK and oletools can reach the VBA part.

Troubleshooting

Common PPTM problems

  • "Microsoft has blocked macros from running because the source of this file is untrusted." The file has the Mark of the Web. If you trust it, unblock it in its Properties and open it again.
  • PowerPoint won't open the file after you renamed it. Office XML files are ZIP packages whose content type says what they are, so renaming one doesn't convert it, and PowerPoint reports an error when the name and the content disagree. Rename it back and use Save As.
  • The macros are gone. The deck was saved as PPTX, or edited in a program that doesn't keep VBA projects. Go back to the last PPTM.
  • A button does nothing in the show. Macros are disabled or blocked, the button's action points to a macro that no longer exists, or you're in PowerPoint for the web or another app that doesn't run VBA.
  • The attachment was blocked. Many organisations block macro-enabled Office files by type. Share a link, or send a PPTX or PDF if the macros aren't needed.

Free downloads

Sample PPTM files to download

Free sample macro-enabled presentations for testing upload filters, type detection, converters and macro scanners. None of them contains macros: each is a valid PPTM package without a VBA project, safe to open. Each was checked with unzip -t, by opening it with python-pptx, by converting it to PDF with LibreOffice and looking at the pages, and with olevba.

sample-presentation.pptm · 38.8 KBDownload

Browsers can't show this kind of file in a page. Download it to open it in the app it belongs to.

What's inside sample-presentation.pptm

Browsers can't preview PPTM files, so download it and open it in PowerPoint or LibreOffice Impress, or rename a copy to .zip to see the parts. PowerPoint may still show a security bar because of the file type, but there is nothing to enable.

  1. Five 16:9 slides

    A title slide, two bullet slides, a table and a closing slide, on the standard layouts of one slide master.

  2. The content-type table

    Slide 3 lists the main part content types of .pptx, .pptm, .ppsm and .potm, the one line that tells these formats apart.

  3. How to check for macros

    Slide 4: the three methods from this page, with the olevba result for this very file.

  4. Notes, numbers, transitions and a link

    Speaker notes on every slide, slide-number fields, fade transitions, and a hyperlink to this page whose address is in ppt/slides/_rels/slide5.xml.rels.

  5. Document properties

    Title, author, keywords and a comment saying the file contains no macros, in docProps/core.xml.

  6. No VBA project

    No ppt/vbaProject.bin and no vbaProject relationship: only the content type of ppt/presentation.xml marks it as macro-enabled.

All sample PPTM files

  • Sample PPTM presentation (no macros)

    sample-presentation.pptm · 38.8 KB (39,715 bytes)

    Five slides made with python-pptx, then given the macro-enabled content type: bullets, a table, notes, slide numbers, transitions, a hyperlink and document properties. No VBA project.

    • Testing previews and converters with a real PPTM
    • Checking that a macro scanner reports a clean file
  • Minimal PPTM, eleven parts

    sample-minimal.pptm · 4.6 KB (4,744 bytes)

    The hand-written sample-minimal.pptx from the PPTX page with the macro-enabled main content type and one line of slide text changed. It's the file in the anatomy above.

    • Diffing the PPTX and PPTM content types
    • Parser tests with the smallest PPTM
  • Mismatch test: PPTX content, .pptm name

    sample-content-type-mismatch.pptm · 4.6 KB (4,742 bytes)

    A minimal PPTX package, with the ordinary PPTX content type, saved under a .pptm name. PowerPoint should refuse to open it because the name and the content disagree. No macros.

    • Testing detectors that compare content with extension
    • Checking how your app reports a mismatched file
  • 100 KB PPTM file

    sample-100kb.pptm · 100 KB (102,400 bytes)

    The featured presentation, padded to exactly 102,400 bytes with whitespace inside docProps/app.xml, stored uncompressed. No macros.

    • Upload limits with a macro-enabled type
    • Testing type-based upload filters

Ways to test with them

  • Upload filters: a filter that blocks macro-enabled Office files by type should stop all four. One that blocks only files with real macros should let them through, since none has a VBA project.
  • Content sniffing: sample-content-type-mismatch.pptm is a PPTX inside. A detector that reads [Content_Types].xml should say PPTX; one that trusts the name says PPTM.
  • Macro scanners: olevba reports "No VBA or XLM macros found" for every file. A scanner that flags them is reacting to the type, not to code.
  • Diff the packages: unzip -p sample-minimal.pptm "[Content_Types].xml" and the same for sample-minimal.pptx differ only in the main part's ContentType.
  • Size limits: sample-100kb.pptm is exactly 102,400 bytes.

Free to use for testing, teaching and demos, commercially or not, with no attribution needed. A link back to this page is always appreciated.

Put it online

Have a PPTM file? Give it a link.

Drop a macro-enabled presentation on 99helpers and it gets its own link. Browsers can't display PPTM files, so visitors download it, and PowerPoint on Windows blocks its macros because it came from the internet; if viewers only need the slides, share a PPTX or PDF instead.

Questions

PPTM files, frequently asked

What is a PPTM file?

A PowerPoint presentation that can contain VBA macros. It's built like a PPTX, a ZIP package of XML, with a different content type for the main part and an optional VBA project inside.

What's the difference between PPTX and PPTM?

Only macros. A PPTM can hold a VBA project and a PPTX can't. Slides, layouts, notes and media are stored the same way.

Is a PPTM file safe to open?

Opening it is usually fine; enabling its macros is the risk. Only enable content in presentations you expected, from someone you trust.

Do macros run automatically when I open a PPTM?

PowerPoint's documented auto-run macros, Auto_Open and Auto_Close, work in add-ins, not presentations. In a PPTM, macros usually run from a button, a shape's action or the Macros list, and only if macros are enabled.

How do I enable macros in a PPTM file?

Choose Enable Content on the yellow bar. If you see a red Security Risk banner, the file came from the internet: close it, open its Properties, tick Unblock and open it again.

How do I remove the macros from a PPTM?

Open it in PowerPoint and Save As PowerPoint Presentation (.pptx). The VBA project isn't saved in the PPTX. Renaming the file doesn't remove anything.

How can I see if a PPTM has macros without opening it?

List its contents with unzip -l and look for vbaProject.bin, or run olevba from oletools, which extracts the VBA code without running it.

Can I open a PPTM without PowerPoint?

Yes, LibreOffice Impress opens it. It won't run PowerPoint's VBA macros the way PowerPoint does, which is often what you want when you only need the slides.

Related formats

Other file types explained

Keep going

Related

Sources

Last reviewed 27 October 2026.