是否有找到word文档上指定表之前存在的书签?
答案 0 :(得分:1)
您可以使用书签Start
或End
(范围)属性来获取书签的排序。
Public Sub TestIt()
Dim bm1 As Bookmark
Dim bm2 As Bookmark
Set bm1 = ActiveDocument.Bookmarks("Bookmark1")
Set bm2 = ActiveDocument.Bookmarks("Bookmark2")
If bm1.Start < bm2.Start Then
MsgBox "bm1 is before bm2"
ElseIf bm1.Start > bm2.Start Then
MsgBox "bm2 is before bm1"
Else
MsgBox "bm1 and bm2 start at the same place"
End If
End Sub