name: Office Remediation Patterns
description: Office document OOXML manipulation patterns for accessibility remediation. Covers python-docx, openpyxl, python-pptx API references, PowerShell COM automation snippets, and direct OOXML XML manipulation for fixing accessibility issues in Word, Excel, and PowerPoint files.
Office Remediation Patterns
API reference and code patterns for programmatically fixing accessibility issues in Microsoft Office documents.
python-docx Patterns (Word .docx)
Operation
Code
Set document title
doc.core_properties.title = "Title"
Set document language
Set <w:lang w:val="en-US"/> on <w:rPr> via lxml
Fix table headers
row.cells[0]._tc → set <w:tblHeader/> on first row <w:trPr>
Add alt text to images
Set descr attribute on <wp:docPr> via lxml
Fix heading levels
Reassign paragraph.style to correct Heading N
Set list structure
Apply List Bullet / List Number styles
openpyxl Patterns (Excel .xlsx)
Operation
Code
Set workbook title
wb.properties.title = "Title"
Set print titles
ws.print_title_rows = '1:1' for header row repeat
Rename generic sheets
ws.title = "Descriptive Name"
Detect merged cells
ws.merged_cells.ranges — flag width > 1
python-pptx Patterns (PowerPoint .pptx)
Operation
Code
Set presentation title
prs.core_properties.title = "Title"
Add slide titles
Add PP_PLACEHOLDER.TITLE placeholder with text
Add alt text to shapes
shape._element.set(qn('p:nvSpPr/p:cNvPr'), ...) → set descr
Fix reading order
Reorder <p:spTree> children by visual position
Add table headers
Set first row cells as header via <a:tblPr firstRow="1">
Run npx skillmds@latest add community-access/office-remediation-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
--- It is listed under Web & Frontend on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Community-Access (@community-access) published this skill. Their other Agent Skills are listed on their SkillMD profile.