Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Option Explicit
Sub CheckIt_Bookmark()
If Selection.Start > ActiveDocument.Bookmarks("Yadda").Range.Start And _
Selection.Start < ActiveDocument.Bookmarks("Yadda").Range.End Then
MsgBox "Selection is in the bookmark Yadda."
Else
MsgBox "Selection is NOT in the bookmark Yadda."
End If
End Sub
Sub CheckIt_Table()
Dim TableNum As Long
TableNum = InputBox( _
"Type in table number (in order in the document), and press Enter")
On Error GoTo Blah:
If Selection.Start > ActiveDocument.Tables(TableNum).Range.Start And _
Selection.Start < ActiveDocument.Tables(TableNum).Range.End Then
MsgBox "Selection is in the third table."
Else
MsgBox "Selection is NOT in the third table."
End If
Blah:
If Err = 5941 Then
MsgBox "Identified table does not exist."
End If
End Sub
Sub CheckIt_Table2()
Dim TableName As String
TableName = InputBox( _
"Type in table Name and press Enter")
On Error GoTo Blah:
If Selection.Start > ActiveDocument.Bookmarks(TableName).Range.Tables(1).Range.Start And _
Selection.Start < ActiveDocument.Bookmarks(TableName).Range.Tables(1).Range.End Then
MsgBox "Selection is in table " & TableName & "."
Else
MsgBox "Selection is NOT in table " & TableName & "."
End If
Blah:
If Err = 5941 Then
MsgBox "Identified table does not exist."
End If
End Sub