PptMcp.ComInterop 1.0.0

dotnet add package PptMcp.ComInterop --version 1.0.0
                    
NuGet\Install-Package PptMcp.ComInterop -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PptMcp.ComInterop" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PptMcp.ComInterop" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="PptMcp.ComInterop" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PptMcp.ComInterop --version 1.0.0
                    
#r "nuget: PptMcp.ComInterop, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PptMcp.ComInterop@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PptMcp.ComInterop&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=PptMcp.ComInterop&version=1.0.0
                    
Install as a Cake Tool

PptMcp.ComInterop

Low-level COM interop utilities for PowerPoint automation.

Overview

This library provides PowerPoint-specific COM object lifecycle management and OLE message filtering. It's the foundation layer for PptMcp projects, handling STA threading, session management, and batch operations specifically for PowerPoint COM automation.

Features

  • STA Threading Management - Ensures proper single-threaded apartment model for PowerPoint COM objects
  • COM Object Lifecycle - Automatic COM object cleanup and garbage collection
  • OLE Message Filtering - Handles busy/rejected COM calls with retry logic using Polly
  • PowerPoint Session Management - Manages PowerPoint.Application lifecycle safely
  • Batch Operations - Efficient handling of multiple PowerPoint operations in a single session

Usage Example

using PptMcp.ComInterop;

// Use PptSession for safe PowerPoint automation
await using var session = await PptSession.BeginAsync("path/to/presentation.pptx");
await using var batch = await session.BeginBatchAsync();

await batch.ExecuteAsync<int>(async (ctx, ct) => 
{
    // Access PowerPoint presentation through ctx.Book
    dynamic slides = ctx.Book.Slides;
    dynamic slide = slides.Item(1);
    
    // Perform PowerPoint operations
    slide.Name = "UpdatedSlide";
    
    return 0;
});

await batch.Save();

Key Classes

  • PptSession - Manages PowerPoint.Application lifecycle and presentation operations
  • PptBatch - Groups multiple operations for efficient execution
  • ComUtilities - Helper methods for COM object cleanup and safe property access
  • OleMessageFilter - Implements retry logic for busy PowerPoint instances

Requirements

  • Windows OS
  • .NET 10.0 or later
  • Microsoft PowerPoint 2016+ installed

Platform Support

  • ✅ Windows x64
  • ✅ Windows ARM64
  • ❌ Linux (PowerPoint COM not available)
  • ❌ macOS (PowerPoint COM not available)
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on PptMcp.ComInterop:

Package Downloads
PptMcp.Core

Core library for PowerPoint automation operations via COM interop. Provides high-level commands for slides, shapes, text, charts, and more. Shared by PptMcp.McpServer and PptMcp.CLI.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 85 3/20/2026