1

I'm looking for a macro solution that will search for a particular word in the word count. Say I'm up to word 23,050 in a document (I work with book-length manuscripts) I would like to be able to go to that word. The normal go-to command will go to a line or a page but not a word. Any ideas?

4

1 回答 1

1

尝试这个:

Option Explicit

Sub GoToWord(lWord As Long)
    ThisDocument.Words(lWord).Select
    Selection.Collapse
End Sub

第一个命令将在文档中选择所需的单词,第二个命令将光标放在该单词的开头。请注意,Words使用的集合包括标点符号。

于 2013-02-14T04:15:23.037 回答