所选内容。查找属性 (Word)Selection.Find property (Word)

返回一个 Find 对象,该对象包含查找操作所需的条件。Returns a Find object that contains the criteria for a find operation. 此为只读属性。Read-only.

语法Syntax

表达式查找expression.Find

_表达式_一个代表**Selection** 对象的变量。expression A variable that represents a Selection object.

说明Remarks

如果查找操作成功,选定内容就会更改。The selection is changed if the find operation is successful.

示例Example

以下示例在文档中向前搜索“Microsoft”。The following example searches forward through the document for the word "Microsoft." 如果找到了该单词,则自动将其选中。If the word is found, it is automatically selected.

With Selection.Find 
 .Forward = True 
 .ClearFormatting 
 .MatchWholeWord = True 
 .MatchCase = False 
 .Wrap = wdFindContinue 
 .Execute FindText:="Microsoft" 
End With

另请参阅See also

Selection 对象Selection Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.