AI Agent Hub
Back to skills
PPT Win32COM Editor icon

PPT Win32COM Editor

Office Efficiency Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please refer to https://skillhub.cn/install/skillhub.md to install @user_bd21c5dc/ppt-win32com-editor.

About this skill

The Specific Problem

When modifying existing PPT presentations, we often need to adjust fonts, unify colors, change paragraph spacing, or batch-replace text. However, libraries like python-pptx discard complex elements from the original file: gradient backgrounds, shadows, arrow connectors, FREEFORM shapes, and SmartArt. This ruins the professional appearance and breaks the original layout and visual effects.

Core Capabilities and Workflow

This skill uses win32com (PowerPoint COM interface) to directly edit the existing PPT file, preserving all elements. The core workflow includes:

  • Backing up the original file: Automatically copy to *_backup.pptx before any modification.
  • Opening with win32com: Launch PowerPoint via COM and load the target file.
  • Executing modifications: Supports common operations such as:
  • Replacing fonts globally
  • Changing text colors throughout
  • Adjusting paragraph spacing
  • Iterating over all slides and text boxes for content editing
  • Saving and closing: Save the file and close the COM connection after edits.

The key advantage is editing in place rather than rebuilding, thus retaining all shapes, images, connectors, and effects.

Applicability and Caveats

  • Environment requirements: Must run on Windows with Microsoft PowerPoint (2016 or later) installed.
  • COM exclusivity: PowerPoint cannot be in use by the user during operation to avoid COM interface conflicts.
  • Color order: PowerPoint COM's .RGB property is actually BGR (blue-green-red), requiring conversion to the correct RGB value in code.
  • 1-based indexing: For example, Slides(1) refers to the first slide, not starting from 0.
  • Use case: Only for modifying existing PPTs; for new PPTs, use other tools like pptx-generator.

In summary, this skill is suitable for global beautification and batch editing tasks where preserving complex PPT elements is essential.

Use Cases

  • When needing to unify the font and color scheme of a company's quarterly report PPT without breaking the original gradient backgrounds and shapes.
  • Before a meeting, quickly edit the text content in a presentation while preserving all SmartArt diagrams and shadow effects.
  • Required to batch-replace brand color values in multiple marketing PPTs to ensure consistent visual style across all files.
  • Aiming to optimize paragraph spacing and line height in an existing PPT for better readability without losing any arrow connectors or freeform shapes.

Best For

  • A marketing specialist who regularly updates product introduction PPTs and wants to keep design elements unchanged while only editing text.
  • An administrative assistant responsible for maintaining a company template library, who must ensure all PPT templates retain a professional look after modifications.
  • A consultant who frequently customizes presentations for clients and needs to quickly adjust font colors to match client brand guidelines.
  • A training instructor who needs to batch-process multiple educational course PPTs, unifying paragraph formatting without breaking interactive graphics.