Create a tool that can programmatically insert suggested edits (redlined insertions, deletions, and replacements) into an existing .docx Word document. These edits should appear in Microsoft Word as tracked changes, identical to how human reviewers suggest edits.
Most established libraries for working with .docx files do not support tracked changes (like insertions and deletions that show up as suggestions in Word). Therefore, we manipulate WordprocessingML directly (OpenXML format) to produce tracked edits:
<w:ins>— Inserted text (appears as underlined suggestion)<w:del>— Deleted text (appears as strikethrough suggestion)- Metadata (author, timestamp, revision ID)