语言

Fields 接口

定义

对象的集合 Field ,这些对象表示选定内容、区域或文档中的所有字段。

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
属性
实现

注解

使用 字段 属性返回 字段 集合。

Add(Range, Object, Object, Object)使用 方法将字段添加到 Fields 集合。

使用 Fields (index) (其中 index 为 index 数字)返回单个 Field 对象。 索引号代表选定内容、 范围或文档中的字段位置。

将 Fields 属性与 MailMerge 对象一起使用可返回 MailMergeFields 集合。

文档中Count此集合的 属性仅返回main文章中的项数。 若要对其他情景中的项进行计数,请将 集合与 对象一起使用 Range 。

属性

名称 说明
Application

返回一个 Application 对象,该对象代表 Microsoft Word 应用程序。

Count

返回指定集合中的项数。

Creator

返回一个 32 位整数,它指示在其中创建指定的对象的应用程序。

Item[Int32]

返回集合中的单个对象。

Locked

确定是否锁定集合中的所有 Fields 字段。

Parent

返回一个对象,代表指定对象的父对象。

方法

名称 说明
Add(Range, Object, Object, Object)

将 Field 对象添加到集合。Fields

GetEnumerator()

对象的集合 Field ,这些对象表示选定内容、区域或文档中的所有字段。

ToggleShowCodes()

在域代码和字段结果之间切换字段的显示。

Unlink()

将集合中的所有 Fields 字段替换为其最新结果。

Update()

更新域对象的结果。

UpdateSource()

将对 INCLUDETEXT 域所做的更改保存回源文档。

适用于