PowerPoint Automation
Use the local script at scripts/powerpoint_automation.ps1 for desktop PowerPoint tasks.
Prefer this skill when the user explicitly wants the desktop application involved, when a workflow needs Microsoft PowerPoint compatibility, or when a generated .pptx should be validated or exported through the installed Office app instead of a pure code pipeline.
This skill is intentionally dual-mode:
- interactive desktop work: prefer
launch - background automation: use
open-check,save-as,export-pdf, orexport-images
If Windows session isolation blocks COM automation, the skill will avoid falling back to WPS. For open-check, it can fall back to launching the file in real Microsoft PowerPoint. For export/save actions, it returns a structured session-isolation error so the next step is obvious.
Available actions
launch: start the real Microsoft PowerPoint desktop app, optionally with a target fileopen-check: open a presentation invisibly, confirm it loads, then close itsave-as: open a presentation and save it to another pathexport-pdf: export a presentation to PDFexport-images: export slides to PNG or JPG images in a target folder
Command pattern
Run:
powershell -ExecutionPolicy Bypass -File "<skill-dir>\scripts\powerpoint_automation.ps1" `
-Action <launch|open-check|save-as|export-pdf|export-images> `
[-InputPath "<absolute-input-path>"] `
[-OutputPath "<absolute-output-path>"] `
[-ImageFormat png|jpg] `
[-Width 1920] `
[-Height 1080]
Rules
- Use absolute Windows paths.
- Create output directories before export when needed.
- Keep PowerPoint hidden unless the user explicitly wants an interactive window.
- Close the presentation and quit the COM application in all cases.
- If COM automation fails, surface the exact error instead of silently falling back to another tool.
- For image export, pass
-OutputPathas a directory. - Do not run multiple PowerPoint automation commands in parallel against the same desktop session.
- For
launch, prefer the installed Microsoft Office path atC:\Program Files\Microsoft Office\root\Office16\POWERPNT.EXE. - Treat file association and process checks as part of verification when the user wants to avoid WPS.
- Prefer
launchfor everyday editing, template review, or "open this deck in PowerPoint" requests. - Prefer COM actions only when the task truly needs deterministic save/export output from the desktop Office app.
Notes
- This skill depends on
PowerPoint.ApplicationCOM being available on the machine. - The script returns structured JSON so results can be inspected or chained into later steps.
- Session-isolation errors such as
0x80070520orMK_E_UNAVAILABLEusually mean the current shell cannot control the interactive desktop Office session. In that case, uselaunchor letopen-checkfall back to desktop launch.