Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move cursor outside of table

Tags:

ms-word

vba

I am using VB to write a macro in Word. what i need to do is, if i am within a table i need to move out of it. so if

x = Selection.Information(wdWithInTable)

then i have to move out.

What is the code to move out of the table?

like image 337
rana123 Avatar asked Nov 18 '10 07:11

rana123


1 Answers

Well, that depends of course exactly where you want to move to - before or after the table or somewhere quite different; your question is a bit vague.

This code will get you out of the table and put the text cursor directly behind it:

Selection.Tables(1).Select
Selection.Collapse WdCollapseDirection.wdCollapseEnd
like image 61
Tom Juergens Avatar answered Oct 28 '22 06:10

Tom Juergens