FieldIndexFormat

FieldIndexFormat enumeration

指定FieldIndex文档中的字段。

public enum FieldIndexFormat

价值观

姓名价值描述
Template0来自模板。
Classic1经典的。
Fancy2想要。
Modern3现代的。
Bulleted4项目符号。
Formal5正式的。
Simple6简单的。

例子

展示如何格式化 FieldIndex 字段。

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Write("A");
builder.InsertBreak(BreakType.LineBreak);
builder.InsertField("XE \"A\"");
builder.Write("B");

builder.InsertField(" INDEX \\e \" · \" \\h \"A\" \\c \"2\" \\z \"1033\"", null);

doc.FieldOptions.FieldIndexFormat = FieldIndexFormat.Fancy;
doc.UpdateFields();

doc.Save(ArtifactsDir + "Field.SetFieldIndexFormat.docx");

也可以看看