{ "$schema": "../_schema.json", "format": "docx", "element": "comment", "parent": "paragraph|run", "addParent": [ "/body/p[N]", "/body/p[N]/r[M]" ], "operations": { "add": true, "set": true, "get": true, "query": true, "remove": true }, "paths": { "stable": [ "/comments/comment[@commentId=N]" ], "positional": [ "/comments/comment[N]" ] }, "note": "Comments live in WordprocessingCommentsPart. Anchor: CommentRangeStart/End surround the target run or paragraph; CommentReference marks the inline anchor.", "extends": [ "_shared/comment", "_shared/comment.docx-pptx" ], "properties": { "id": { "type": "number", "description": "OOXML comment id (w:comment/@w:id). Assigned by the writer; surfaces only on Get/Query.", "add": false, "set": false, "get": true, "readback": "integer comment ID", "enforcement": "report" }, "anchoredTo": { "type": "string", "description": "path of the paragraph or run the comment is anchored to (resolved from CommentRangeStart).", "add": false, "set": false, "get": true, "readback": "path of anchored paragraph/run", "enforcement": "report" }, "runStart": { "type": "int", "description": "1-based run index inside the parent paragraph where the comment range starts. N=0 (default) anchors the comment to paragraph start; N>=1 places immediately after the Nth run so dump→batch round-trip restores intra-paragraph anchor positions.", "aliases": ["runstart"], "add": true, "set": false, "get": false, "examples": [ "--prop runStart=2" ], "readback": "n/a (encoded inline; surfaces via anchoredTo path)", "enforcement": "report" }, "range": { "type": "bool", "description": "whether the comment spans a text range (default true: emits + around the anchor plus a run). Pass range=false for a zero-width / point-anchored comment that carries ONLY — used by dump→batch to preserve reference-only comments without synthesizing a spurious range.", "aliases": ["pointRef", "pointref"], "add": true, "set": false, "get": false, "examples": [ "--prop range=false", "--prop pointRef=true" ], "readback": "n/a (encoded inline; affects emitted markers)", "enforcement": "report" }, "parentId": { "type": "number", "description": "w:id of the comment this one replies to. Threads the reply under its parent in Word's review pane via word/commentsExtended.xml (w15:paraIdParent, keyed by the comment paragraphs' w14:paraId). Get returns the parent comment's w:id on replies only.", "aliases": ["parentid"], "add": true, "set": false, "get": true, "examples": [ "--prop parentId=1" ], "readback": "parent comment w:id (replies only)", "enforcement": "report" }, "done": { "type": "bool", "description": "resolved-state of the comment (Word's 'Resolve'), stored in word/commentsExtended.xml as w15:done. Get returns done=true|false on every comment, so 'query comment[done=false]' lists unresolved comments.", "aliases": ["resolved"], "add": true, "set": true, "get": true, "examples": [ "set \"/comments/comment[1]\" --prop done=true", "--prop done=false" ], "readback": "true|false", "enforcement": "report" } } }