Sentences 接口

定义

Range代表所选内容、范围或文档中所有句子的对象的集合。A collection of Range objects that represent all the sentences in a selection, range, or document. 没有句子的对象。There is no Sentence object.

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

注解

使用、 Sentences或对象的句子 Selection 属性 Range Document 可返回句子集合。Use the Sentences property of a Selection, Range , or Document object to return the Sentences collection.

使用句子index )(其中 index 是索引号)返回表示句子的Range对象。Use Sentences(index), where index is the index number, to return a Range object that represents a sentence. 索引号代表句子的 句子 集合中的位置。The index number represents the position of a sentence in the Sentences collection.

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

Add 方法不适用于 句子 的集合。The Add method isn't available for the Sentences collection. 而是使用 InsertAfter(String) or InsertBefore(String) 方法将句子添加到Range对象。Instead, use the InsertAfter(String) or InsertBefore(String) method to add a sentence to a 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.

First

返回一个 Range 对象,表示文档、选定内容或区域中的第一个句子、单词或字符。Returns a Range object that represents the first sentence, word, or character in a document, selection or range.

Item[Int32]

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

Last

返回一个 Range 对象,表示文档、选定内容或区域中的最后一个字符、单词或句子。Returns a Range object that represents the last character, word, or sentence in a document, selection, or range.

Parent

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

方法

GetEnumerator()

适用于