How to Use IronPPT with ChatGPT Codex

Curtis Chau
Curtis Chau
Updated: 19. Oktober 2026

A sales operations team sends the same deck every Monday. A template supplies the slides and the week's figures fill them. The single region slide becomes one slide per region, an outdated promotion slide is removed, and the appendix stays in the file but out of the slideshow. When a slide operation fails silently, the deck still saves and the job log still reports success. The regional managers then receive a recap of a promotion that ended on June 30, one slide ahead of this week's highlights.

ChatGPT Codex is OpenAI's coding agent. It works in a repository, where it edits files, runs commands such as dotnet run and reports what it changed. The same agent runs in a terminal, an IDE extension, the ChatGPT desktop app and the cloud. IronPPT, Iron Software's .NET library for PowerPoint, creates, opens, edits and saves .pptx files without Microsoft Office.

Codex gets a weekly sales template, a rules file and two weeks of regional data. Each slide count it reports comes from a CSV written in the same turn, and each slide operation is tested on a saved deck before the batch code relies on it.

Quickstart
NuGetMit NuGet installieren

PM > Install-Package IronPPT

Install IronPPT by running the command above in the NuGet Package Manager Console, or search for the package in the NuGet Package Manager.

Start Codex in a .NET 9 console project that contains the Templates and Data folders.

$ironppt Install IronPPT 2026.10.1 in this console app and list the slides of the sales template.

Program.cs opens Templates/weekly-sales-template.pptx and saves nothing.
Each slide gets a row in out/quickstart.csv, with these columns:

- number, counting from 1
- heading, the first text on the slide
- texts, how many text items the slide holds
- shown, yes or no from the slide's Show property

Program.cs reads IRONPPT_LICENSE_KEY itself and copies it into License.LicenseKey.
Never print the key or write it to a file or log, and don't list environment variables.

If three builds or runs fail, stop and show me the last error.
Otherwise, read the slide count back from the CSV and tell me the number.
Text

The $ironppt mention loads IronPPT's skill before Codex writes code.



What is ChatGPT Codex, and how does it fit into .NET presentation work?

The /permissions command sets when Codex edits files or runs commands without asking first. The Codex CLI documentation covers installation and terminal use, and the open-source repository publishes its releases.

Codex's knowledge of IronPPT comes from its training data and the files it is given. A member name that IronPPT lacks fails the build.

IronPPT ships a .NET Standard 2.0 assembly, and its NuGet package lists Windows, Linux and macOS. The test run built the project on Windows.

How do you write an IronPPT prompt and set up Codex for it?

The prompts below name the template and the data (Templates/weekly-sales-template.pptx and Data/week-41.csv) and the rules (Data/README.md, which sets the order, the omitted and hidden slides and the house style).

Codex scans .agents/skills in every folder from the working directory up to the repository root. Each skill is a folder containing a SKILL.md whose frontmatter defines a name and a description. Saving IronPPT's skill.md as .agents/skills/ironppt/SKILL.md allows the $ironppt mention to resolve. The skill states that it was checked against IronPPT 2026.8.1, while this guide installs 2026.10.1.

Codex reads AGENTS.md before it starts any work. It walks from the repository root down to the working folder, takes at most one file per directory and lets the deeper file override the shallower one. The /init command generates a first draft.

Write an AGENTS.md in the repository root, under a heading called Weekly sales deck.
Put these rules in it, one per line:

- IronPPT 2026.10.1 is the only PowerPoint library here. Package and namespace are both IronPPT.
- Don't add DocumentFormat.OpenXml or any other Office package.
- Data/README.md defines the deck, and it wins over anything else.
- Templates/ and Data/ are read-only.
- Look up IronPPT members in the ironppt skill under .agents/skills/ironppt/.
- A probe on a saved deck outranks both the skill and the installed IronPPT.xml.
- A deck counts as built only once it's saved, reopened from disk and checked.
- Every count you report comes from a CSV written in that turn. The reply names that CSV.
- The key stays in IRONPPT_LICENSE_KEY.

Show me the finished file.
Text

How do you ask Codex to add IronPPT and check the license?

Show me the IronPPT PackageReference in WeeklySalesDeck.csproj and the version NuGet resolved.
Then quote the full output of dotnet list package with --include-transitive.
Don't change any package references.
Text

IronPPT 2026.10.1 depends on IronSoftware.Common 2026.4.2 and IronSoftware.System.Drawing 2026.8.2, and the test run's package list showed 30 transitive packages, among them SixLabors.ImageSharp 3.1.12 and Grpc.Net.Client 2.62.0. Review the IronPPT changelog before pinning a release.

Without a key, IronPPT opens a deck, reads its text, adds slides and text, and hides slides. Only Save fails, with a licensing exception whose message is Production License Required, and no file is written. IronPPT reads a key from the IronPPT.LicenseKey or IRONPPT_LICENSEKEY environment variable by itself, but it ignores IRONPPT_LICENSE_KEY. Code that keeps the key under that name assigns License.LicenseKey before the first save. The licensing exception type is not public in IronPPT 2026.10.1, so a handler catches Exception and checks the type name.

Move the key line into Startup.ApplyIronPptKey and call that method first in Program.cs.
It sets License.LicenseKey from IRONPPT_LICENSE_KEY, then prints License.IsLicensed.

Next, test what IronPPT does without a key.
Start the program three times as child processes, each with a --licence-check option:

1. Clear IRONPPT_LICENSE_KEY for that child only.
2. Keep the variable set, and pass a --no-startup flag that skips the Startup call.
3. Keep the variable set and the Startup call in place.

Each child opens the template, replaces {{WEEK}} with 41 and saves out/licence-check-N.pptx.
Write each call to out/licence-check.csv, with run, call, result, exception type and message.
Add a column that says whether each pptx file exists afterwards.
If three repair attempts fail, stop there.
Tell me which of the three runs saved a file.
Text

The license keys page lists the other ways to supply a key.

Why does the guide's slide code leave the deck unchanged?

The manage-slide guide removes a slide with Slides.RemoveAt and moves one with Slides.Remove followed by Slides.Insert, and the IronPPT skill describes Slides as a mutable list. In IronPPT 2026.10.1, PresentationDocument.Slides returns a new list each time it is read, and those calls change only that copy. In calibration, Slides.RemoveAt(0) on a loaded six-slide deck left the count at six, and a deck saved after a move kept its original order. The code compiles, raises no exception and saves the slide it was meant to remove.

Three operations on an existing slide do reach the deck. Calling Remove() on the slide itself drops it from the saved file, and Show = false writes a hidden slide that stays in the file. Setting Slide.Index moves the slide, and a separate probe reopened the saved deck in the new order.

Probe which slide operations survive a save, in a console app at scratch/slides-probe/.

Run it yourself on a copy of the template in scratch/, and apply the key the way Startup does.
Add a Compile Remove item that keeps scratch/** out of WeeklySalesDeck.csproj.
Give each case its own try block and its own saved file.

Reopen each saved file and measure these cases:

- Slides.RemoveAt(4), and whether the slide count drops
- Slides.Remove, then Slides.Insert(1, ...) on Highlights, and the order that results
- Remove() on the Q2 Promotion Recap slide itself
- Clone() on the region slide
- AddSlide(new Slide()) with AddText, and where the new slide ends up
- Show = false on the appendix

Then have the explorer agent read IronPPT.xml and the ironppt skill, writing nothing.
It reports what each source says about the Slides collection and about Clone.

Put every finding in out/slides-probe.csv, quoting the probe output, the XML or the skill.
Mark the rows where the skill and the probe disagree, and tell me which they are.
Text

A check against the edited list object passes, because that copy did change.

How do you assemble the weekly deck from the template?

The manage-slide guide does not cover duplicating a slide. In IronPPT 2026.10.1, Clone() on a slide throws a MissingMethodException, and adding the same slide object twice leaves no extra slide in the saved file. Removing a slide and adding it again at the end left an empty slide at its old position. The method that works adds a new Slide for each output slide, fills it with new text in the order the deck needs and then calls Remove() on the template originals.

Copying styling from a loaded deck also fails. In calibration, a 36 pt heading copied property by property was written at 3,600 pt, and its color #1F4E79 became black. The prompt therefore sets the README's house style on every text.

The template follows the slide list in the README, with Q2 Promotion Recap fifth and Highlights sixth.

Download weekly-sales-template.pptx

The weekly sales template used in the test run, with one region slide that holds the region tokens.

Have the worker agent write Services/DeckAssembler.cs. It builds the deck Data/README.md describes.

DeckAssembler accepts these options:

- --week, which picks Data/week-NN.csv and Data/week-NN.tokens
- --template, defaulting to Templates/weekly-sales-template.pptx
- --plan, which writes out/deck-plan.csv and saves no deck
- --build, which saves out/week-NN.pptx

The probe showed which calls reach the saved file.
Build the deck with those calls, in these steps:

1. Open the template and find each slide by its heading.
2. For every output slide, add a new slide with AddSlide and write its texts with AddText.
3. Set the README's house style on every text you write.
4. Set Show = false on the new appendix slide.
5. Call Remove() on the eight template slides, then save.

The plan CSV has one row per output slide, with position, template heading, final heading and shown.
Run --plan --week 41, then give me the row count and the hidden slides from the CSV.
Text

How do you check the deck Codex saved?

Run --build --week 41, then check the saved deck with code that's separate from the build.

The check reopens out/week-41.pptx and writes out/week-41-check.csv with these columns:

- position and heading
- shown
- the slide's full text, joined with " | "
- whether any {{ is left

Compare the check CSV with out/deck-plan.csv row by row.
Tell me which rows differ, and whether Q2 Promotion Recap appears anywhere in the deck.
Text

Output

DeckAssembler saved the deck below for week 41 in the test run, and it is published unchanged.

Download week-41.pptx

The week 41 sales deck as IronPPT saved it.

What happens when the template changes?

Show me that DeckAssembler refuses Templates/weekly-sales-template-v2.pptx.
Marketing sent it with Highlights renamed to Wins This Week.

Run --build --week 41 --template Templates/weekly-sales-template-v2.pptx.
The existing out/week-41.pptx has to stay the same, byte for byte.
Record the attempt in out/template-check.csv with these columns:

- exit code and message
- the headings the build found
- the SHA-256 of out/week-41.pptx before and after

Tell me whether the two hashes match.
Text

How do you check a slide from a screenshot?

Codex accepts images as context. Pass one with the -i flag (long form --image) when starting or resuming a session, or paste it into the interactive composer.

Check the screenshot I attached with -i against the data and the deck.
A regional manager sent it and says the West revenue is wrong.
Don't change any code, and work through these steps:

1. Read the region and its three figures from the image.
2. Compare them with Data/week-41.csv and Data/week-40.csv.
3. Compare them with the West slide in out/week-41.pptx, using its text in out/week-41-check.csv.
4. Write the comparison to out/screenshot-check.csv.

Tell me which week the screenshot shows, and whether out/week-41.pptx is right.
Text

How do you debug incorrect deck output end to end?

Find out why the week 40 deck went out wrong. Data/week-40-complaint.md lists four problems.
Logs/week-40/deck.log says every step worked. Output/week-40.pptx is the deck that was sent.

Have the explorer agent read Jobs/LegacyWeeklyDeck.cs, the log and the deck before anything else.
A throwaway script under scratch/ may read the deck.
Don't edit any code outside scratch/.

Write out/week-40-diagnosis.md and cover these points in it:

- the line behind each of the four problems
- why the log reported success anyway
- the smallest fix for each, based on what the probe showed

Then give me one line per problem.
Text

Review the diagnosis before allowing any edit. The legacy job wrote each log line after a call returned and never reopened the deck.

How do you turn one-off code into reusable, tested components?

Ask the worker agent for a DeckService class that meets these conditions:

- It resolves from a Microsoft.Extensions.DependencyInjection container.
- A DeckOptions record configures it, with week, template, plan-only and output folder.
- It keeps the README rules, the heading check and the house style from DeckAssembler.
- DeckService.cs stays below 150 lines, and its public members have XML doc comments.
- Nothing calls Jobs/LegacyWeeklyDeck.cs.

Then build week 41 with DeckService into out/final/week-41.pptx.
Check that deck the way you checked out/week-41.pptx, into out/final/week-41-check.csv.
Compare the two check files and list every difference.
Text

A refactor can drop the heading check and still compile.

Add an xUnit project at tests/WeeklySalesDeck.Tests, in the same solution as the main project.
Exclude tests/** from what the main project compiles.
The tests get the key through Startup.ApplyIronPptKey.

Each test builds a deck in a temp folder and reopens it.
Between them, the tests check these conditions:

- week 41 gives 11 slides, with Highlights second and the appendix hidden
- the five region slides follow the CSV order
- East shows Revenue: $0 and still has its slide
- no {{ is left anywhere, and Q2 Promotion Recap is gone
- the v2 template is refused, and the message names the missing heading

Run dotnet test with --logger trx and --results-directory out/tests/.
Read the trx file and tell me how many tests passed and failed.
Text

For API questions, the installed IronPPT.xml documents slide members such as AddSlide, Remove, Clone, Index and Show. The probe results show which of them reach a saved deck.

$ironppt List the members in the installed IronPPT.xml that add, remove, move, copy or hide slides.
For each member you find, tell me these two things:

- what the XML says it does
- whether out/slides-probe.csv or the trx file in out/tests/ shows it working on a saved deck

Then write one compiling line per member in a probe project under scratch/api-probe/.
Build that probe with dotnet build, but don't run it.
Text

How do you reuse these prompts on another deck?

With the template, the data files and the README rules changed, the same prompts apply to board packs, project status decks or customer reviews. For setup that applies to every assistant, refer to the IronPPT AI coding assistants guide.

What did the prompts produce in a real run?

The prompts above went to Codex in order, in one session. The legacy job, its log and its deck were added before the debugging prompt. Separate scripts reopened every deck the run saved and read each slide from the file.

  • Before the run, the template held eight slides, all of them shown.
  • With the variable cleared, the save threw the licensing exception, and the output file did not exist afterwards.
  • With the variable set and the startup call skipped, the save failed the same way.
  • In the probe, Slides.RemoveAt(4) left all eight slides in the saved file.
  • Clone() on the region slide threw a MissingMethodException.
  • Codex started three subagents, and the debugging prompt reused the explorer agent from the probe prompt.
  • The saved week 41 deck held 11 slides in the README order, with the five region slides in CSV order.
  • Ten slides were shown, and the appendix was saved as hidden.
  • Q2 Promotion Recap was absent from the deck.
  • East kept its slide with revenue of $0.
  • The refused v2 template left the SHA-256 hash of the existing deck unchanged.
  • Codex matched the screenshot to the week 40 West figures.
  • The diagnosis tied each of the four week 40 problems to its lines in the legacy job.
  • The diagnosis traced the hidden North slide to the reused region slide that Slides.Last() returned.
  • A deck built with DeckService matched the first build on every slide.
  • All five tests passed in Codex's run and in ours.
  • Some steps ran differently from the page. NuGet packages came from a cache restored before the run, because the sandbox had no network.

The GitHub Copilot guide measures a similar failure for pictures, where the Replace call from the manage image guide leaves the old photo in a loaded deck. The Google Antigravity guide builds decks for simultaneous web requests, which IronPPT served correctly only when a single lock guarded every IronPPT call. The shared run record gives the Codex version, the model, the timing and the test machine.


Troubleshooting


Questions?

If you have any questions, reach out to support@ironsoftware.com

Curtis Chau hat einen Bachelor-Abschluss in Informatik von der Carleton University und ist spezialisiert auf Frontend-Entwicklung mit Expertise in Node.js, TypeScript, JavaScript und React. Leidenschaftlich widmet er sich der Erstellung intuitiver und ästhetisch ansprechender Benutzerschnittstellen und arbeitet gerne mit modernen Frameworks sowie der Erstellung gut strukturierter, optisch ansprechender Handbücher.

Weiterlesen

Bereit anzufangen?

Nuget Downloads 6,246Version:2026.10gerade veröffentlicht