本示例将所选内容移至前一个批注之前,然后为第一个批注添加内容。

With Selection
    Set MyRange = .GoTo(wpsGoToComment, wpsGoToPrevious)
    .MoveRight Unit:=wpsWord, Count:=1, Extend:=wpsExtend
    If Selection.Comments.Count >= 1 Then
        Selection.Comments(1).Range = "this is Test!"
    End If
End With