Comments on a slide are in a part reached through the slide’s comments
relationship, and the people who wrote them are in another part reached from the
presentation.
The comments part
The classic form, in ECMA-376, is ppt/comments/commentN.xml with the root
element p:cmLst.
<p:cmLst xmlns:p="…">
<p:cm authorId="0" dt="2024-05-01T09:30:00.000" idx="1">
<p:pos x="10" y="10"/>
<p:text>Please check this figure.</p:text>
</p:cm>
</p:cmLst>
| Item | Meaning |
|---|---|
authorId | A number in the comment authors part. |
dt | The date and time. |
idx | The comment’s number. |
p:pos | Where on the slide the comment is pinned. |
p:text | The comment. |
The authors are in ppt/commentAuthors.xml: a p:cmAuthorLst of
p:cmAuthor elements, each with an id, a name and
initials.
Schema details
Part 1 Annex A (the PresentationML comment types, research/ooxml/ecma376/p1/part1.txt line 157032 onward):
p:cm has children pos (a:CT_Point2D, required), text (string, required) and
extLst, and attributes authorId (required), dt (optional dateTime) and idx (required).
p:cmAuthor has the required attributes id, name, initials, lastIdx
(the index of the last comment by that author; new comments count from one more, 19.4.2) and clrIdx (an index into the
application's comment colour table, wrapping round when there are more authors than colours), and an optional extLst.
Divergence from spec: position
- The standard does not say how to read
pos; PowerPoint reads it relative to the top left corner of the slide ([MS-OI29500] 2.1.1136 a). - The standard says the
yattribute is a coordinate on the x-axis; PowerPoint uses it as a coordinate on the y-axis (2.1.1137 a). - The standard types
xandyas ST_Coordinate; PowerPoint treats the values as ST_EighthPointMeasure (2.1.1137 b).
Modern comments
Recent versions of PowerPoint also write a newer, threaded form, kept in a part with its
own content type and with its authors in ppt/authors.xml. It is a Microsoft
extension and is not in ECMA-376. A comment can hold replies, and its text is in a
DrawingML text body.
The details below are from [MS-PPTX] v20240820 (research/ooxml/ms/MS-PPTX.txt) 2.1.5, 2.1.6, 2.16 and the schema in 5.14. The namespace is
http://schemas.microsoft.com/office/powerpoint/2018/8/main.
- Parts. Comments: content type
application/vnd.ms-powerpoint.comments+xml, rootcmLst, relationshiphttp://schemas.microsoft.com/office/2018/10/relationships/comments, explicit, from a slide. Authors: content typeapplication/vnd.ms-powerpoint.authors+xml, rootauthorLst, relationshiphttp://schemas.microsoft.com/office/2018/10/relationships/authors, implicit from the presentation, zero or one (2.1.5, 2.1.6). - Author (2.16.3.1):
id(a GUID, required),name(required),initials(optional),userIdandproviderId(both required: the identity as in CT_PresenceInfo, 2.4.3.7, and the provider that issued it), then an optionalextLst. - Comment
cm(2.16.3.3, 5.14), children in order: an anchor,pos(a point, relative to the top-left corner of the first object the comment is anchored to),replyLst, thentxBody(the text, a DrawingML text body) andextLst. The anchor is one ofpc:sldMkLst(a moniker of the slide; the one required form),ac:deMkLst(a drawing element),ac:txMkLst(a text range) orunknownAnchor(an empty element, kept for future kinds). The moniker lists belong to other [MS-] specifications and are not described here. - Attributes of a comment:
id(GUID),authorId(GUID, the author’sid),status(active,resolvedorclosed; defaultactive),created(dateTime, required); and for comments onlystartDate,dueDate(dateTime),assignedTo(a list of author ids, default empty),complete(a percentage, default 0%) andtitle(default empty). - Reply
replyinreplyLst(2.16.3.6): the sameid,authorId,statusandcreated, withtxBodyandextLst; a reply has no anchor, position or replies of its own. commentRel(2.16.1.3) is an element with one requiredr:id, a relationship to a comment part.
In the explorer the Comments table lists a modern comment with its author’s name (looked up through authorId in the authors part), the
created date and the text, and each reply on its own row marked “(reply)”; a status other than active is shown in brackets after the
author. A parenthesis before the text gives the title, startDate, dueDate, assignedTo (author names),
complete, the kind of anchor (slide, drawing element, text range or unknown) and pos when they are present; the anchor is named but its
moniker contents are not followed to the shape or text. The task history that [MS-PPTX] 2.20 attaches to comments is described on the
Package page but not shown in the Comments table (reactions, 2.21, are listed in the Overview). An author’s identity is shown after the name as [providerId: userId], read from the userId and providerId attributes of a modern author or from the p15:presenceInfo extension of a classic p:cmAuthor (2.4.3.7).