Qu

docx.add_field

Builtin index · File I/O

docx.add_field(doc, i, code, [text=])

Input: doc, i, code, text · Output: no output

What it is

Appends any field -- "PAGE", "NUMPAGES", "DATE \\@ \"d MMMM yyyy\"", "REF name \\h" -- to the end of body paragraph i, marked dirty so the word processor computes it on open; text is what shows until then. docx.fields(doc) lists the instructions of every field in the body, simple and complex. *Added in v0.4.5*

Overloads

One call shape — this function is not overloaded.

CodeInputOutputDescription
docx.add_field(doc, i, code, [text=])
doc —docx.fields(doc) lists the instructions of every field in the body, simple and complex.
i —Appends any field -- "PAGE", "NUMPAGES", "DATE \\@ \"d MMMM yyyy\"", "REF name \\h" -- to the end of body paragraph i, marked dirty so the word processor computes it on open.
code —not documented yet
text optionaltext is what shows until then.
not documented yet*Added in v0.4.5*.

Examples

No documentation example calls this form yet. The File I/O chapter is where one belongs.