Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Making Word do something that Wordperfect can do | New Users | |||
Macros - Keyboard Commands | Microsoft Word Help | |||
Wordperfect Office 2000 conversion to Word 2003 | New Users | |||
letters - ask/fillin | New Users | |||
WP Delay Code - Word Equiv | Microsoft Word Help |