Setting Table Width with VBA

T

Tim Dexter

Hi
I have a macro that allows users to insert a column into a
table and select the contents for the cells prior to
insertion (the table are only ever 2 rows.)
The insertion and cell filling is fine but when I insert
InsertColumnsRight the width of the table is pushed out
beyond the page.
Is there anyway I can programmatically pull the width back
in and resize the column accordingly. I am not bothered
about the column cells wrapping in an ugly way.
I have tried getting the table width b4 the insertion and
then resetting the width after but the PreferredWidth
method returns 999999?

Any clues

Thanks

Tim
 
W

Word Heretic

G'day "Tim Dexter" <[email protected]>,

Turn off autofit options?

Tim Dexter said:
Hi
I have a macro that allows users to insert a column into a
table and select the contents for the cells prior to
insertion (the table are only ever 2 rows.)
The insertion and cell filling is fine but when I insert
InsertColumnsRight the width of the table is pushed out
beyond the page.
Is there anyway I can programmatically pull the width back
in and resize the column accordingly. I am not bothered
about the column cells wrapping in an ugly way.
I have tried getting the table width b4 the insertion and
then resetting the width after but the PreferredWidth
method returns 999999?

Any clues

Thanks

Tim

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email (e-mail address removed)
Products http://www.geocities.com/word_heretic/products.html

Replies offlist may require payment.
 

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