FieldIndexFormat enumeration

FieldIndexFormat enumeration

Specifies the formatting for the FieldIndex fields in a document.

Members

NameDescription
TEMPLATEFrom template.
CLASSICClassic.
FANCYFancy.
MODERNModern.
BULLETEDBulleted.
FORMALFormal.
SIMPLESimple.

Examples

Shows how to formatting FieldIndex fields.

doc = aw.Document()
builder = aw.DocumentBuilder(doc=doc)
builder.write('A')
builder.insert_break(aw.BreakType.LINE_BREAK)
builder.insert_field(field_code='XE "A"')
builder.write('B')
builder.insert_field(field_code=' INDEX \\e " · " \\h "A" \\c "2" \\z "1033"', field_value=None)
doc.field_options.field_index_format = aw.fields.FieldIndexFormat.FANCY
doc.update_fields()
doc.save(file_name=ARTIFACTS_DIR + 'Field.SetFieldIndexFormat.docx')

See Also