Word.Interfaces.FieldData interface

一个接口,用于描述通过调用 field.toJSON()返回的数据。

属性

code

指定字段的代码指令。

data

指定“Addin”字段中的数据。 如果字段不是“Addin”字段,则 null 为 ,并且会在代码尝试设置该字段时引发一般异常。

kind

获取字段的类型。

locked

指定是否锁定字段。 true 如果字段已锁定, false 则为 ;否则为 。

result

获取字段的结果数据。

showCodes

指定是否显示指定字段的域代码。 true 如果显示域代码,则为 ; false 否则为 。

type

获取字段的类型。

属性详细信息

code

指定字段的代码指令。

code?: string;

属性值

string

注解

[ API 集:WordApi 1.4 ]

注意:WordApi 1.5 中引入了设置代码的功能。

data

指定“Addin”字段中的数据。 如果字段不是“Addin”字段,则 null 为 ,并且会在代码尝试设置该字段时引发一般异常。

data?: string;

属性值

string

注解

[ API 集:WordApi 1.5 ]

kind

获取字段的类型。

kind?: Word.FieldKind | "None" | "Hot" | "Warm" | "Cold";

属性值

Word.FieldKind | "None" | "Hot" | "Warm" | "Cold"

注解

[ API 集:WordApi 1.5 ]

locked

指定是否锁定字段。 true 如果字段已锁定, false 则为 ;否则为 。

locked?: boolean;

属性值

boolean

注解

[ API 集:WordApi 1.5 ]

result

获取字段的结果数据。

result?: Word.Interfaces.RangeData;

属性值

注解

[ API 集:WordApi 1.4 ]

showCodes

指定是否显示指定字段的域代码。 true 如果显示域代码,则为 ; false 否则为 。

showCodes?: boolean;

属性值

boolean

注解

[ API 集:WordApiDesktop 1.1 ]

type

获取字段的类型。

type?: Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined";

属性值

Word.FieldType | "Addin" | "AddressBlock" | "Advance" | "Ask" | "Author" | "AutoText" | "AutoTextList" | "BarCode" | "Bibliography" | "BidiOutline" | "Citation" | "Comments" | "Compare" | "CreateDate" | "Data" | "Database" | "Date" | "DisplayBarcode" | "DocProperty" | "DocVariable" | "EditTime" | "Embedded" | "EQ" | "Expression" | "FileName" | "FileSize" | "FillIn" | "FormCheckbox" | "FormDropdown" | "FormText" | "GotoButton" | "GreetingLine" | "Hyperlink" | "If" | "Import" | "Include" | "IncludePicture" | "IncludeText" | "Index" | "Info" | "Keywords" | "LastSavedBy" | "Link" | "ListNum" | "MacroButton" | "MergeBarcode" | "MergeField" | "MergeRec" | "MergeSeq" | "Next" | "NextIf" | "NoteRef" | "NumChars" | "NumPages" | "NumWords" | "OCX" | "Page" | "PageRef" | "Print" | "PrintDate" | "Private" | "Quote" | "RD" | "Ref" | "RevNum" | "SaveDate" | "Section" | "SectionPages" | "Seq" | "Set" | "Shape" | "SkipIf" | "StyleRef" | "Subject" | "Subscriber" | "Symbol" | "TA" | "TC" | "Template" | "Time" | "Title" | "TOA" | "TOC" | "UserAddress" | "UserInitials" | "UserName" | "XE" | "Empty" | "Others" | "Undefined"

注解

[ API 集:WordApi 1.5 ]