position and size of the cell in irregular tables

K

kostal.michal

Hello,
is it somehow possible to find out the position of the cell relative
to a page using vba? And also the size of the merged cell? I tried
everything, but I did not found any posibillity.

michal
 
J

Jezebel

You can get the width (in points) using: selection.Cells(1).Width

You can get the vertical position of the top of the cell using:
selection.Cells(1).Range.Information(wdVerticalPositionRelativeToPage)

There's no direct way to get the height of a cell. There is a Height
property, but that reports the row height setting; which usually doesn't
help. You can calculate the height by getting the vertical position of the
beginning and end of the cell range and subtracting (and checking that the
cell is not split across pages).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top