DOCX Working With Headersfooters

Sub-skill of docx: Working with Headers/Footers.

vamseeachanta Updated

File contents

Working with Headers/Footers

Working with Headers/Footers

from docx import Document

doc = Document()

# Add header
section = doc.sections[0]
header = section.header
header_para = header.paragraphs[0]
header_para.text = "Document Header"

# Add footer
footer = section.footer
footer_para = footer.paragraphs[0]
footer_para.text = "Page Footer"

doc.save("with_header_footer.docx")

vamseeachanta/workspace-hub/tree/main/.agents/skills/_archive/data/documents/docx/working-with-headersfooters commit 68c8e230ee

Frequently asked questions

npx skillmds@latest add vamseeachanta/docx-working-with-headersfooters