Reply
 
Thread Tools Display Modes
  #1   Report Post  
lebur05
 
Posts: n/a
Default How do I format multiple tables in MS word together?

I am using a program that generates a MSWord doc. The tables generated in the
docs have columns that a different widths.

Is there a way to set the column widths for all the tables to one standard
width without having to manually change each table?

Thanks
  #2   Report Post  
Jay Freedman
 
Posts: n/a
Default

lebur05 wrote:
I am using a program that generates a MSWord doc. The tables
generated in the docs have columns that a different widths.

Is there a way to set the column widths for all the tables to one
standard width without having to manually change each table?

Thanks


If you want all the columns to be the same widths across each table (so in a
3-column table each column is 1/3 the page width, in a 4-column table each
is 1/4 the page width, and so on), use this macro (see
http://www.gmayor.com/installing_macro.htm if necessary):

Sub AllTablesUniformCols()
Dim oTbl As Table

For Each oTbl In ActiveDocument.Tables
oTbl.Columns.DistributeWidth
Next oTbl
End Sub

If all the tables have the same number of columns, but they need to be of
different widths, you can do something like this instead (adjust as
necessary):

Sub AllTablesSetWidths()
' assumes every table has 3 columns
Dim oTbl As Table

For Each oTbl In ActiveDocument.Tables
oTbl.Columns(1).Width = InchesToPoints(1.5)
oTbl.Columns(2).Width = InchesToPoints(2.5)
oTbl.Columns(3).Width = InchesToPoints(1.7)
Next oTbl
End Sub

If neither of these is suitable, describe your tables in more detail, and we
can probably work something out.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org


  #3   Report Post  
Doug Robbins
 
Posts: n/a
Default

This is one thing where recording a macro may give an acceptable result.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"lebur05" wrote in message
...
I am using a program that generates a MSWord doc. The tables generated in
the
docs have columns that a different widths.

Is there a way to set the column widths for all the tables to one standard
width without having to manually change each table?

Thanks



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Making Word do something that Wordperfect can do NarniaUK New Users 4 May 1st 05 10:44 PM
Macros - Keyboard Commands Janet Microsoft Word Help 6 April 11th 05 05:28 AM
Wordperfect Office 2000 conversion to Word 2003 MikeE New Users 1 March 21st 05 01:04 AM
letters - ask/fillin Caroline H New Users 2 February 25th 05 09:19 PM
WP Delay Code - Word Equiv Mike G - Milw, WI Microsoft Word Help 6 January 10th 05 05:12 PM


All times are GMT +1. The time now is 11:21 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"