WPS/Word Automation (Windows): Single-Document Word/WPS Automation via COM

Introduction

Modifying Word or WPS documents on Windows usually involves hand-coding VBA, encapsulating COM yourself, or having an Agent call a pile of unverified scripts. In single-document scenarios, steps like reading the body text, batch replacement, inserting titles, modifying headers and footers, pagination, merging and splitting, exporting to PDF/TXT, and replacing images are repetitive and prone to pitfalls regarding Office version and WPS compatibility. Below is an introduction to WPS/Word Automation (Windows) on SkillHub: collecting the above capabilities into an Agent-callable Skill, targeting single-file operations, without building a batch pipeline.

What is this

WPS/Word Automation (Windows) is a set of document automation Skills based on Windows COM, enabling an Agent to perform common editing and export actions on locally installed Microsoft Word or WPS.

  • Coordinate: @org-eyw2ohcx/sundial-org-awesome-openclaw-skills-wps-word-automation
  • Version: 1.0.0
  • Source: enterprise
  • Category: office-efficiency
  • Publisher: RealQ
  • Tags: requires_api_key=false (No extra API Key required)

SkillHub Page: WPS/Word Automation (Windows)

Official API Entry: https://api.skillhub.cn/org-eyw2ohcx/sundial-org-awesome-openclaw-skills-wps-word-automation

Core Features

The following capabilities are derived from the official SkillHub description and operate on Word/WPS via COM on Windows:

Category Capabilities
Read & Modify Read document text, find and replace, insert content
Structure Titles, headers and footers, page breaks
Document-level Merge, split
Export Export to PDF, TXT
Media Add or replace images

The official documentation explicitly states: Suitable for single-time, single-document operations, does not support batch processing. If you need to pipeline hundreds or thousands of .docx files in a directory, you should choose a batch processing solution, rather than the design goal of this Skill.

Installation and Activation

The official documentation requires following the SkillHub installation guide and installing the full coordinate of this Skill.

1. Install SkillHub CLI (if not installed yet)

First, check if CLI is already installed:

command -v skillhub && skillhub --version

If not installed, you can use the official installation script (which includes CLI and default Skills):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

To install CLI only:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only

2. Install this Skill to the current Agent’s skills directory

SkillHub documentation states: When installing, you must use --dir to point to the skills directory currently being used by the Agent; otherwise, it defaults to ./skills/, and the Agent may not recognize it.

skillhub install @org-eyw2ohcx/sundial-org-awesome-openclaw-skills-wps-word-automation --dir <skills directory>

The skills directories for different environments (from SkillHub installation documentation, choose one based on the Agent you actually use):

Agent skills directory example
Cursor ~/.cursor/skills/
Claude Code ~/.claude/skills/
Codex ~/.codex/skills/ or .agents/skills/ in the project
OpenClaw / Hermes, etc. The skills directory specified in their respective documentation

After installation, enable the Skill according to the loading method of the Agent you are using (most require a restart or refreshing the skills directory). This Skill is in the generic SKILL.md format; specific trigger words and parameters are based on SKILL.md inside the installation package.

Typical Usage

The public page does not include independent end-to-end command examples. In actual use, after enabling the Skill in the Agent, describe the single document path and target operation in natural language, for example: reading the full text of a .docx, saving as another file after replacing a specified string, inserting a first-level title, setting a header, inserting a page break at a specific location, merging two files, splitting by chapters, exporting to PDF or TXT, replacing embedded images, etc.

Please confirm the following before execution:

  1. The runtime environment is Windows, and Word or WPS is installed and callable via COM.
  2. The document path is readable/writable by the current user, and the export target directory exists.
  3. Only one document task is processed at a time, fitting the Skill’s declared “no batch” scope.

More detailed steps and boundary conditions are based on SKILL.md in the Skill directory after installation, to avoid inconsistencies with the local version.

Applicable Scenarios and Notes

Who is this for

  • On a Windows workstation, wanting an Agent to handle reading and exporting of single contracts, reports, or template documents.
  • Already using tools like Cursor, Claude Code, Codex, etc., that support Skills, and wishing to use the SkillHub installation source uniformly.

Limitations and Notes

  • Platform: Windows + COM only; Linux/macOS cannot use the core capabilities of this Skill.
  • Scale: Batch processing is not supported; multi-file loops need to be orchestrated by yourself or switched to a different tool.
  • Environment: COM calls launch or occupy Word/WPS processes. On unattended servers, consider desktop sessions and authorization popups.
  • Word and WPS: The Skill description mentions both Word and WPS; specific API differences are encapsulated by the Skill implementation. If COM behavior changes after upgrading Office, rely on local actual testing.

SkillHub Statistics (based on collected data): Score 100000, Downloads 751; requires_api_key=false, no additional key configuration burden.

Conclusion

WPS/Word Automation (Windows) converges common Word/WPS COM operations in single-document scenarios into an Agent Skill, eliminating the need to write automation glue code yourself. For installation or viewing instructions, please visit:

  • SkillHub Page: https://www.skillhub.cn/skills/org-eyw2ohcx/sundial-org-awesome-openclaw-skills-wps-word-automation
  • Installation Guide: https://skillhub.cn/install/skillhub.md
  • Coordinate: @org-eyw2ohcx/sundial-org-awesome-openclaw-skills-wps-word-automation
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye