全部显示

GoToNext 方法

       

应用于 RangeSelection 对象的 GoToNext 方法。

应用于 MailMessage 对象的 GoToNext 方法。

示例

本示例在活动文档的第二页的上边添加一个书签。

Set myRange = ActiveDocument.Words(1).GoToNext(What:=wdGoToPage)
ActiveDocument.Bookmarks.Add Name:="Page2", Range:=myRange

本示例移至下一个域,并选定该域。

With Selection
    Set myRange = .GoToNext(What:=wdGoToField)
    .MoveRight Unit:=wdWord, Extend:=wdExtend
    .Fields(1).Select
End With