A Windows desktop application for viewing and editing PowerPoint Tags on the active slide or selected shape in a running PowerPoint presentation. Also allows renaming slides directly from the inspector.

- Windows 10 or later
- .NET 8.0 SDK or Runtime
- Microsoft PowerPoint (2016 or later) installed and running
dotnet builddotnet run --project "PowerPoint Tag Inspector"Or open the solution in Visual Studio and press F5.
- Open Microsoft PowerPoint with a presentation.
- Launch the PowerPoint Tag Inspector application.
The application window is divided into three sections:
Radio buttons to select the tag source:
- Active Slide — reads/writes tags on the currently active slide
- Selected Shape — reads/writes tags on the currently selected shape
The selected radio button displays contextual info (e.g., Active Slide (#1 Slide1) or Selected Shape (#5 TextBox 3)).
Located between Options and Tags. Shows:
- Slide #N label — the current slide index
- Text field — the editable slide name
- Apply button — commits the new name to PowerPoint
This works in both Active Slide and Selected Shape modes (always shows the current slide info).
A table (ListView) displaying the tag list with columns Name and Value.
Action buttons:
| Button | Description |
|---|---|
| Add... | Opens a dialog to create a new tag |
| Edit... | Opens a dialog to modify the selected tag's value |
| Delete | Removes the selected tag after confirmation |
| Refresh | Re-reads tags from the current target |
Displays connection status, presentation name, mode, and tag count:
Connected: Demo.pptx | Mode: Active Slide | Tags: 3
When adding a new tag, the Name field offers autocomplete suggestions from a list of reserved tag names:
RowsDataSourceNameRowsCountDeleteIfRowsGroupFieldNameDeleteUnusedColumns
You can still enter any custom name — the suggestions are non-restrictive.
- If PowerPoint is not running, the app shows "Not connected" and allows retry via Refresh.
- If no shape is selected in "Selected Shape" mode, an appropriate message is displayed.
- All operations gracefully handle COM errors without crashing.
PowerPointTagInspector/
├── Program.cs # Application entry point
├── MainForm.cs / .Designer.cs # Main UI (options, slide name editor, tags, status bar)
├── TagEditorDialog.cs / .Designer.cs # Modal dialog for Add/Edit tag (with autocomplete)
├── Models/
│ ├── TagItem.cs # Immutable record: tag name + value
│ ├── TagSourceMode.cs # Enum: ActiveSlide | SelectedShape
│ └── TagEditorState.cs # State manager (mode, target, tags, slide info, errors)
└── Services/
├── PowerPointService.cs # COM Interop layer for PowerPoint
└── ComInteropHelper.cs # P/Invoke shim for GetActiveObject (.NET 8)
| Layer | Responsibility |
|---|---|
| PowerPointService | Direct COM interaction with PowerPoint (connect, get slides/shapes, read/write/delete tags, rename slides) |
| TagEditorState | Manages application state, coordinates between UI and service layer |
| UI (MainForm + TagEditorDialog) | User interface, event handling, displays errors |
- COM Interop in .NET 8:
Marshal.GetActiveObjectwas removed in .NET Core. A customComInteropHelperuses P/Invoke (oleaut32.dll/ole32.dll) to obtain the running PowerPoint instance. - PowerPoint Tags API: Tags are accessed via
Slide.TagsorShape.Tags(1-based index).Tags.Add(name, value)performs upsert. Tag names are case-insensitive. - COM Object Lifecycle:
PowerPointServiceimplementsIDisposableand releases COM references on disconnect. The app never closes PowerPoint.
- Open PowerPoint and create a new presentation.
- Launch PowerPoint Tag Inspector.
- Verify status bar shows:
Connected: Presentation1.pptx | Mode: Active Slide | Tags: 0. - Verify the Slide Name editor shows
Slide #1and the current slide name. - Change the slide name in the text field, click Apply — verify it updates in PowerPoint.
- Click Add..., select
RowsDataSourceNamefrom suggestions, enter a value → OK. - Verify the tag appears in the list.
- Select the tag, click Edit..., change the value → OK.
- Verify the updated value is displayed.
- Click Delete, confirm → tag is removed.
- In PowerPoint, insert a shape and select it.
- Switch to Selected Shape mode.
- Add a tag to the shape, verify it persists.
- Switch back to Active Slide — verify slide tags are shown (not shape tags).
- Close PowerPoint → click Refresh → verify error message appears gracefully.
- Reopen PowerPoint with a presentation → click Refresh → verify reconnection.
- Microsoft PowerPoint 2016, 2019, 2021, Microsoft 365
- .NET 8.0
- Windows 10 / 11