A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Tables in Word



 
 
Thread Tools Display Modes
  #1  
Old January 15th, 2010, 05:28 AM posted to microsoft.public.word.tables
Mischa
external usenet poster
 
Posts: 6
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  
Old January 15th, 2010, 07:17 AM posted to microsoft.public.word.tables
macropod[_2_]
external usenet poster
 
Posts: 2,402
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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:49 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.