Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / October 2005

Tip: Looking for answers? Try searching our database.

Anyway to get Preferredwidth for a table with merged columns?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JWS315 - 27 Oct 2005 18:04 GMT
Is there ANYWAY to determine the width of a table that has merged columns?  
Jean-Guy showed a way to get the table width for a table without merged
columns, however I have many users that like to create tables with merged
columns.

The preferredwidth property returns 99999 if the table is merged and the
column width returns an error.

I am copy and pasting the merged table as a nested table and I need to know
if the table is wider than 1 column in page layout to auto size the new table
to either fit in 1 column or spread it across the whole page.

Jerry
Stefan Blom - 31 Oct 2005 09:21 GMT
Wouldn't AutoFit work for you?

To make a table fit the width of its container:

  <TableObject>.AutoFitBehavior wdAutoFitWindow

And to restore a fixed width:

  <TableObject>.AutoFitBehavior wdAutoFitFixed

Signature

Stefan Blom
Microsoft Word MVP

> Is there ANYWAY to determine the width of a table that has merged columns?
> Jean-Guy showed a way to get the table width for a table without merged
[quoted text clipped - 9 lines]
>
> Jerry

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.