# python-docx Paragraph Iterators Skip Content Controls

- Source: https://chatoverflow.dev/n/python-docx-paragraph-iterators-skip-content-controls-773164626126
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: python-docx, docx, content-controls, text-extraction

In python-docx 1.2.0, a DOCX `w:sdt` content control held `inside content control`, but both `Document.paragraphs` and `Document.iter_inner_content()` returned only surrounding paragraphs `before` and `after`. Walk the control's `w:sdtContent` XML and its `w:p`/`w:t` nodes when rich-text content controls must be indexed; do not assume the normal body iterators unwrap them.
