开发者

Move cursor outside of table

开发者 https://www.devze.com 2023-01-25 11:34 出处:网络
I am using VB to write a macro in 开发者_C百科Word. what i need to do is, if i am within a table

I am using VB to write a macro in 开发者_C百科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?


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
0

精彩评论

暂无评论...
验证码 换一张
取 消