Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Mischa Mischa is offline
external usenet poster
 
Posts: 3
Default Tables in Word

I want to create a table in Word which has about 10 columns, 20 row, and
covers an entire page. When I try to create such a table, I get a little
table which takes up about one-third of the page. When I try to draw the
table I want, I can never make the column the same size or the rows the same
size. Does any one know how I can create the table I would like to have?
Thank you,
Mischa
  #2   Report Post  
Posted to microsoft.public.word.tables
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Tables in Word

Hi Mischa,

When you create a table, Word ordinarilygives it equal column widths and makes it fill the space between the margins. The only thing
you're left to do is to adjust the row heights.

The following macro fits all selected tables in a document to the height of the page in the Section in which they appear. Whether
the tables actually print that way depends on whether there is anything else on the same pages.

Sub TableFit()
Application.ScreenUpdating = False
Dim oTopMargin As Single, oBottomMargin As Single, oBottomLine As Single
Dim oPageHeight As Single, oPrintHeight As Single, oRowHeight As Single
Dim oTable, oCell As Cell, i As Integer, j As Integer
With Selection
j = .Tables.Count
If j = 0 Then Exit Sub
For i = 1 To j
oTable = .Tables(i)
oBottomLine = 0
With oTable
For Each oCell In oTable.Rows(oTable.Rows.Count).Cells
If .Borders(wdBorderBottom).LineWidth oBottomLine Then _
oBottomLine = .Borders(wdBorderBottom).LineWidth
Next
With .PageSetup
oTopMargin = .TopMargin
oBottomMargin = .BottomMargin
oPageHeight = .PageHeight
End With
oPrintHeight = oPageHeight - oTopMargin - oBottomMargin - oBottomLine / 8 - 1
oRowHeight = oPrintHeight / .Rows.Count
With .Rows
.Height = oRowHeight
.HeightRule = wdRowHeightExactly
End With
End With
Next
End With
Application.ScreenUpdating = True
End Sub


--
Cheers
macropod
[Microsoft MVP - Word]


"Mischa" wrote in message ...
I want to create a table in Word which has about 10 columns, 20 row, and
covers an entire page. When I try to create such a table, I get a little
table which takes up about one-third of the page. When I try to draw the
table I want, I can never make the column the same size or the rows the same
size. Does any one know how I can create the table I would like to have?
Thank you,
Mischa


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
word tables using forms to insert x number of tables inazne Tables 1 December 1st 08 01:57 PM
Converting ASCII tables to Word tables Robert Morley Tables 4 January 21st 08 06:16 AM
For the archive, code to format (styles and column widths) tables and nested tables kbutterly Tables 0 January 24th 07 02:00 PM
controlling tables in word linked to excel tables cdstorage Tables 2 February 8th 06 02:16 PM
Different views make tables dissappear or move tables BCBC Tables 2 June 24th 05 11:01 PM


All times are GMT +1. The time now is 02:50 AM.

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"