FieldIndexFormat enumeration
FieldIndexFormat enumeration
Specifies the formatting for the FieldIndex fields in a document.
Members
| Name | Description |
|---|---|
| TEMPLATE | From template. |
| CLASSIC | Classic. |
| FANCY | Fancy. |
| MODERN | Modern. |
| BULLETED | Bulleted. |
| FORMAL | Formal. |
| SIMPLE | Simple. |
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
- module aspose.words.fields