Selection.FormattedText 属性

定义

返回或设置一个 Range 对象,该对象在指定的选定内容中包含带格式的文本。

public:
 property Microsoft::Office::Interop::Word::Range ^ FormattedText { Microsoft::Office::Interop::Word::Range ^ get(); void set(Microsoft::Office::Interop::Word::Range ^ value); };
public Microsoft.Office.Interop.Word.Range FormattedText { get; set; }
member this.FormattedText : Microsoft.Office.Interop.Word.Range with get, set
Public Property FormattedText As Range

属性值

注解

此属性返回 Range 对象,以及指定的区域或所选内容中的字符格式和文本。 如果区域或选定内容中有段落标记,则 Range 对象中包含段落格式。

当设置此属性时,区域中的文本将替换带格式的文本。 如果不想替换现有文本,请在使用 Collapse(Object) 此属性之前使用 方法。

适用于