Skip to content
Agentmart
Submit a tool

ppt-core-api

WPS WPP API 核心参考 — 全局变量、Slide/Shape 操作、文本框、图片、布局

Skill by claude-office-skills

IndexedMIT
Write a review

Chalk Labs

Need help deploying ppt-core-api?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/claude-office-skills-ppt-core-api

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

WPS WPP API 核心参考 — 全局变量、Slide/Shape 操作、文本框、图片、布局

Use cases: presentations, backend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/ppt-core-api

What's inside

Skill name
ppt-core-api
Description
WPS WPP API 核心参考 — 全局变量、Slide/Shape 操作、文本框、图片、布局
License
MIT
Instructions
146 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

## 全局变量

- Application / app:WPS 应用对象
- Application.ActivePresentation:当前演示文稿
- Application.ActiveWindow:当前窗口
- Application.ActiveWindow.Selection:当前选区

## 核心 API(同步执行)

### 演示文稿

```javascript
var pres = Application.ActivePresentation;
var slideCount = pres.Slides.Count;
var slide = pres.Slides.Item(1);        // 1-based 索引
var pageW = pres.PageSetup.SlideWidth;  // 默认 960
var pageH = pres.PageSetup.SlideHeight; // 默认 540
```

### 添加幻灯片

```javascript
// 在末尾添加空白页
pres.Slides.Add(pres.Slides.Count + 1, 12);
// 参数2: Layout 枚举
//   1 = ppLayoutTitle (标题页)
//   2 = ppLayoutText (标题+正文)
//   6 = ppLayoutTitleOnly (仅标题)
//   7 = ppLayoutBlank (空白)
//   12 = ppLayoutCustom (自定义/空白)
var newSlide = pres.Slides.Item(pres.Slides.Count);
```

### 文本框

```javascript
// 添加文本框 (left, top, width, height)
var shape = slide.Shapes.AddTextbox(1, 50, 30, 860, 80);
shape.TextFrame.TextRange.Text = "标题文本";
shape.TextFrame.TextRange.Font.Size = 28;
shape.TextFrame.TextRange.Font.Bold = true;
shape.TextFrame.TextRange.Font.Color.RGB = 0x000000; // RGB 格式(非 BGR)
shape.TextFrame.TextRange.Font.Name = "微软雅黑";

// 段落对齐
shape.TextFrame.TextRange.ParagraphFormat.Alignment = 2; // 1=左, 2=居中, 3=右

// 自动换行和内边距
shape.TextFrame.WordWrap = true;
shape.TextFrame.MarginLeft = 10;
shape.TextFrame.MarginTop = 5;
```

### 形状

```javascript
// 矩形 (left, top, width, height)
var rect = slide.Shapes.AddShape(1, 100, 200, 300, 150);
// 常用 AutoShapeType: 1=矩形, 5=圆角矩形, 9=圆形, 13=右箭头

rect.Fill.ForeColor.RGB = 0x4472C4;         // 填充色
rect.Fill.Transparency = 0;                  // 0=不透明, 1=全透明
rect.Line.ForeColor.RGB = 0x2F528F;         // 边框色
rect.Line.Weight = 1.5;                      // 边框宽度
rect.Line.Visible = true;

// 圆角矩形的圆角
rect.Adjustments.Item(1) = 0.2;              // 0~1,值越大越圆
```

### 图片

```javascript
// 插入图片
var pic = slide.Shapes.AddPicture(
  "/path/to/image.png",  // 文件路径
  false,                  // LinkToFile
  true,                   // SaveWithDocument
  100, 100,               // Left, Top
  400, 300                // Width, Height
);
```

### 位置和大小

```javascript
shape.Left = 100;     // 左边距(磅)
shape.Top = 200;      // 上边距(磅)
shape.Width = 400;    // 宽度(磅)
shape.Height = 300;   // 高度(磅)
shape.Rotation = 0;   // 旋转角度
```

### 删除

```javascript
shape.Delete();                    // 删除单个形状
slide.Delete();                    // 删除整页幻灯片
pres.Slides.Item(3).Delete();     // 删除第3页
```

### 选区操作

```javascript
var sel = Application.ActiveWindow.Selection;
// sel.Type: 0=None, 1=Slides, 2=Shapes, 3=Text
if (sel.ShapeRange) {
  for (var i = 1; i <= sel.ShapeRange.Count; i++) {
    var s = sel.ShapeRange.Item(i);
    // 操作选中形状
  }
}
```

### 备注

```javascript
slide.NotesPage.Shapes.Item(2).TextFrame.TextRange.Text = "演讲者备注内容";
```

From claude-office-skills/claude-wps-ppt-plugin, MIT.

Signals

Stars
0
Forks
1
Open issues
0
Last commit (this folder)
Feb 26, 2026 (8 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from claude-office-skills

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get ppt-core-api running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying ppt-core-api?

CallGet help
Cite this page

ppt-core-api skill. Agent Mart. https://agentmart.dev/skills/claude-office-skills-ppt-core-api (last updated 2026-10-24)