Fields 接口

定义

对象的集合, Field 这些对象代表所选内容、范围或文档中的所有字段。A collection of Field objects that represent all the fields in a selection, range, or document.

public interface class Fields : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("00020930-0000-0000-C000-000000000046")]
public interface Fields : System.Collections.IEnumerable
type Fields = interface
    interface IEnumerable
Public Interface Fields
Implements IEnumerable
属性
实现

注解

使用 字段 属性返回 字段 集合。Use the Fields property to return the Fields collection.

使用 Add(Range, Object, Object, Object) 方法将字段添加到Fields集合。Use the Add(Range, Object, Object, Object) method to add a field to the Fields collection.

使用Fieldsindex ),其中 index 是 index 数字,返回单个Field对象。Use Fields(index), where index is the index number, to return a single Field object. 索引号代表选定内容、 范围或文档中的字段位置。The index number represents the position of the field in the selection, range, or document.

Fields属性与邮件合并对象一起使用可返回MailMergeFields集合。Use the Fields property with a MailMerge object to return the MailMergeFields collection.

Count在文档中,此集合的属性返回的只是正文中的项目数。The Count property for this collection in a document returns the number of items in the main story only. 若要统计其他部分中的项目数,请使用带有该对象的集合 RangeTo count items in other stories use the collection with the Range object.

属性

Application

返回一个 Application 代表 Microsoft Word 应用程序的对象。Returns a Application object that represents the Microsoft Word application.

Count

返回指定集合中的项目数。Returns the number of items in the specified collection.

Creator

返回一个 32 位整数,它指示在其中创建指定的对象的应用程序。Returns a 32-bit integer that indicates the application in which the specified object was created.

Item[Int32]

返回集合中的单个对象。Returns an individual object in a collection.

Locked

确定是否锁定集合中的所有字段 FieldsDetermines if all fields in the Fields collection are locked.

Parent

返回一个对象,代表指定对象的父对象。Returns an object that represents the parent object of the specified object.

方法

Add(Range, Object, Object, Object)

Field 对象添加到 Fields 集合中。Adds a Field object to the Fields collection.

GetEnumerator()
ToggleShowCodes()

在域代码和域结果之间切换域的显示。Toggles the display of the fields between field codes and field results.

Unlink()

将集合中的所有字段替换 Fields 为其最近的结果。Replaces all the fields in the Fields collection with their most recent results.

Update()

更新域对象的结果。Updates the result of the fields object.

UpdateSource()

将对 INCLUDETEXT 域所做的更改保存回源文档。Saves the changes made to the results of an INCLUDETEXT field back to the source document.

适用于