Andreas Hermle
asked on
check by VBA if cursor resides in a table on the last page of the current document
Dear Experts:
the following snippet is taken from a macro I regulary run.
I would like to change this snippet to accommodate the following requirement.
Not only is the cursor to reside in a table, but the table is to be located on the last page of the current document.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
If Not Selection.Information(wdWi thInTable) Then
MsgBox ("The cursor does not reside in a a table!" & vbCrLf & _
"Please make sure that the cursor resides in a table!"), vbCritical, "Cursor does not reside in a table!"
Exit Sub
End If
the following snippet is taken from a macro I regulary run.
I would like to change this snippet to accommodate the following requirement.
Not only is the cursor to reside in a table, but the table is to be located on the last page of the current document.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
If Not Selection.Information(wdWi
MsgBox ("The cursor does not reside in a a table!" & vbCrLf & _
"Please make sure that the cursor resides in a table!"), vbCritical, "Cursor does not reside in a table!"
Exit Sub
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry. Forget to put it in a code box.
ASKER
Hi Graham,
very nice coding, I am impressed. Thank you very much for it. As usual works like a charm :-)
Regards, Andreasa
very nice coding, I am impressed. Thank you very much for it. As usual works like a charm :-)
Regards, Andreasa