Finding left edge of a Table

J

John

I'm adding columns to a table via C# addin. I want to
test to see if the right edge of the table is beyond the
right margin. I can add the width of all the columns and
add this sum to the left position of the table.

How do I find the left position of the table?

Thank you,
John
 
C

Cindy M -WordMVP-

Hi John,
I'm adding columns to a table via C# addin. I want to
test to see if the right edge of the table is beyond the
right margin. I can add the width of all the columns and
add this sum to the left position of the table.

How do I find the left position of the table?
If you're talking about the border, and not the text in the
table:

ActiveDocument.Tables(1).Rows.LeftIndent +
ActiveDocument.PageSetup.LeftMargin -
ActiveDocument.Tables(1).LeftPadding

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 

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