• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 578
  • Last Modified:

Information (wdVerticalPositionRelativeToPage) ...

I have a big problem with this functionality.
I need to use it ,because ,I create a lot of tables(dinamicly) in Word Document (in VB code)
And I check :
If (objDoc.ActiveWindow.Selection.Information(wdVerticalPositionRelativeToPage) > 410) Then
    objDoc.ActiveWindow.Selection.InsertBreak Type:=wdPageBreak
End If
It's mean I want to  start a new table on the new page if it's remain a little piece on current page.

But when it's become 488(i Don't know how,because it's already a new page ),after that it's not change never.And always equal to 488 .How can I solve this ,that this functionality will work correctly.
May be somebody had same  problem.
Or maybe somebody has a new solution .Please help me ,it's very urgent for me !!!

p.s. Document must be unvisible .I checked if the Document is visible ,it's work right ?!?!?!?!?
1 Solution
Have you tried using pagragraph formatting to "keep with next" and use the option in the Row Properties to not allow row to break accross pages?

If you have a caption below the table, and you want it to appear with the table, make sure "keep with next" is also on the last row of the table, otherwise turn it off on the last row, to allow the line right after the table to go to the next page.

This will make it so the whole table stays together on one page, and has the benefit that as you edit your document Word will automatically move the new page if the table can now fit on the previous page.

If you want to make sure that just a certain amount of the table appears on one page, say the first 10 rows, then set "keep with next" on just the first 9 rows.
Misha_shAuthor Commented:
to  garlin007,

thank you very much !!
You help me a lot !!!!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now