Skip to content

ppt comment

zmworm edited this page Apr 30, 2026 · 3 revisions

PowerPoint: Slide Comment

Legacy slide-anchored comments. Full add / get / query / set / remove lifecycle.

Path: /slide[N]/comment[M] (1-based, document order on the slide)

Comments live in two parts:

  • Presentation-level CommentAuthorsPart (commentAuthors.xml) — deduplicated authors with monotonic ids
  • Per-slide SlideCommentsPart (comments/commentN.xml)

Authors are deduplicated by name+initials; the SlideCommentsPart is dropped automatically when the last comment on a slide is removed.

add

officecli add slides.pptx /slide[1] --type comment \
  --prop text="Review this metric" \
  --prop author="Alice" --prop initials="AS" \
  --prop x=2cm --prop y=3cm
Property Default Description
text (required) Comment body
author Author name (creates a new CommentAuthor entry on first use)
initials Author initials (used together with name for dedup)
date now (UTC) ISO timestamp
x / y 0 Anchor position on the slide (EMU or unit-qualified: cm, in, pt)
direction / dir rtl prepends a U+200F bidi mark to the comment body so RTL scripts render right-to-left in Word/PowerPoint reviewers; round-trips through Add and Set.

get

officecli get slides.pptx '/slide[1]/comment[1]'

Returns text, author, initials, date, x, y, index.

query

officecli query slides.pptx 'comment'              # all comments across slides
officecli query slides.pptx '/slide[2]/comment'    # filter to one slide

set

In-place edit of any of the same properties. Author/initials edits flow back into the workbook-level CommentAuthor entry.

officecli set slides.pptx /slide[1]/comment[1] --prop text="Approved"
officecli set slides.pptx /slide[1]/comment[1] --prop x=5cm --prop y=2cm

remove

officecli remove slides.pptx /slide[1]/comment[1]

The hosting SlideCommentsPart is removed automatically when the last comment on the slide is deleted.

Notes

  • These are legacy comments, not the modern threaded "modern comments" introduced in PowerPoint 365.
  • For collaborative review markers that travel with the watch preview, see mark instead.

See Also


Based on OfficeCLI v1.0.66

Clone this wiki locally