office_comment
Add, retrieve, reply to, or delete comments in Word, Excel, and PowerPoint documents. Supports targeting specific cells, text, slides, or comment IDs.
Instructions
Manage comments in Word, Excel, or PowerPoint documents.
Replaces: excel_add_comment, excel_get_comments, word_add_comment, pptx_add_comment, pptx_get_comments
Examples: # Get all comments from Excel office_comment(file_path="data.xlsx", operation="get")
# Add comment to Excel cell
office_comment(
file_path="data.xlsx",
operation="add",
target="B5",
text="Review this value"
)
# Add comment to Word text
office_comment(
file_path="report.docx",
operation="add",
target="project timeline",
text="Verify dates with PM"
)
# Reply to an existing Word comment by comment ID
office_comment(
file_path="report.docx",
operation="reply",
target="12", # comment ID from office_comment(..., operation="get")
text="Acknowledged - updated in v2"
)
# Add comment to PowerPoint slide
office_comment(
file_path="deck.pptx",
operation="add",
target="3", # or "slide:3"
text="Update chart data"
)Args: file_path: Path to the document operation: add/get/reply/delete plus resolve/reopen for Word target: Target location/ID - Excel add/delete: cell reference (e.g., "B5") - Excel get: optional sheet name filter - Word add: text span to annotate - Word reply/resolve/reopen/delete: comment ID - PowerPoint add: slide number ("3" or "slide:3") - PowerPoint delete: "slide:N" or "slide:N/comment:I" text: Comment text (required for add/reply) author: Author display name. Also used by Word get(filter="mine") output_path: Optional output path (defaults to overwriting input) format: For Word get only: "flat" (default) or "threaded" filter: For Word get only: "all" (default), "open", "resolved", "mine"
Returns: Dictionary with operation results
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to the document | |
| operation | No | add/get/reply/delete plus resolve/reopen for Word | |
| target | No | Target location/ID | |
| text | Yes | Comment text (required for add/reply) | |
| author | No | Author display name. Also used by Word get(filter="mine") | |
| output_path | No | Optional output path (defaults to overwriting input) | |
| format | No | For Word get only: "flat" (default) or "threaded" | |
| filter | No | For Word get only: "all" (default), "open", "resolved", "mine" |