Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
Is line numbering in tables possible? My boss is wanting this done, but as
far as I know Word does not line number tables. Thank you!! Cheryl |
#2
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
I have found two methods.
For both alternatives, the line numbers are not associated with the lines of the table they are associated with blank paragraphs wrapped around the table or wrapped around the text box. 1. Place the table within a text box. Set the "Wrapping Style" property of the text box, to in front of text. Caution, with these properties it is possible to have text appear behind the text box. If the fill color of the text box is set to white it could create hidden text. Additonally, if the table font is smaller than the document's normal or body text then the line numbers will not align properly. It is also possible to insert text into the text box that is external to the table. 2. You can also get line numbering for tables if the table is center or right aligned. The table's text wrapping property is set to around, and the table alignment is set to right or center. You will have to set a preferred witdth for the table. If the table exceeds a certain width the line numbering will shift below the table. As in the text box solution, the line numbers are roughly accurate, only so long as the table font is the same size as the document's normal of body font. -- Tom Conrad "Journey51" wrote: Is line numbering in tables possible? My boss is wanting this done, but as far as I know Word does not line number tables. Thank you!! Cheryl |
#3
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
Thank you, Tom! I'll try both of those methods.
"Tom Conrad" wrote: I have found two methods. For both alternatives, the line numbers are not associated with the lines of the table they are associated with blank paragraphs wrapped around the table or wrapped around the text box. 1. Place the table within a text box. Set the "Wrapping Style" property of the text box, to in front of text. Caution, with these properties it is possible to have text appear behind the text box. If the fill color of the text box is set to white it could create hidden text. Additonally, if the table font is smaller than the document's normal or body text then the line numbers will not align properly. It is also possible to insert text into the text box that is external to the table. 2. You can also get line numbering for tables if the table is center or right aligned. The table's text wrapping property is set to around, and the table alignment is set to right or center. You will have to set a preferred witdth for the table. If the table exceeds a certain width the line numbering will shift below the table. As in the text box solution, the line numbers are roughly accurate, only so long as the table font is the same size as the document's normal of body font. -- Tom Conrad "Journey51" wrote: Is line numbering in tables possible? My boss is wanting this done, but as far as I know Word does not line number tables. Thank you!! Cheryl |
#4
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
If you're not opposed to adding a column, this macro will add the column and
auto-number or letter the table. Sub LineNumberingTables() '2007 David Sisson 'Adds a column for the numbering. Dim aDoc As Document Dim aTable As Table Dim ThisRow As Table Dim NumRows As Integer Dim A As Integer Dim ASCIICode As Integer 'The Computer number for the letters ASCIICode = 96 'One less than lower case a 'ASCIICode = 64 'One less than upper case A Set aDoc = ActiveDocument Set aTable = aDoc.Tables(1) For Each ThisRow In aDoc.Tables ThisRow.Columns.Add BeforeColumn:=ThisRow.Columns(1) NumRows = ThisRow.Rows.Count For A = 1 To NumRows 'Uses letters. For rows less than 26. 'ThisRow.Cell(A, 1).Range.Text = Chr(ASCIICode + A) + "." 'Uses numbers. e.g. .1, .2, etc ThisRow.Cell(A, 1).Range.Text = "." & A Next ThisRow.Columns(1).AutoFit 'Turns off the borders. ThisRow.Columns(1).Borders(wdBorderLeft) = False ThisRow.Columns(1).Borders(wdBorderBottom) = False ThisRow.Columns(1).Borders(wdBorderTop) = False ThisRow.Columns(1).Borders(wdBorderHorizontal) = False Next End Sub |
#5
![]()
Posted to microsoft.public.word.tables
|
|||
|
|||
![]()
If you are using a unique paragraph style for the first column in the table,
you could simply define that style be numbered. Don't forget to reset the numbering in the first row of each table - assuming that you don't want it to continue from one table to the next. -- SueT "David Sisson" wrote: If you're not opposed to adding a column, this macro will add the column and auto-number or letter the table. Sub LineNumberingTables() '2007 David Sisson 'Adds a column for the numbering. Dim aDoc As Document Dim aTable As Table Dim ThisRow As Table Dim NumRows As Integer Dim A As Integer Dim ASCIICode As Integer 'The Computer number for the letters ASCIICode = 96 'One less than lower case a 'ASCIICode = 64 'One less than upper case A Set aDoc = ActiveDocument Set aTable = aDoc.Tables(1) For Each ThisRow In aDoc.Tables ThisRow.Columns.Add BeforeColumn:=ThisRow.Columns(1) NumRows = ThisRow.Rows.Count For A = 1 To NumRows 'Uses letters. For rows less than 26. 'ThisRow.Cell(A, 1).Range.Text = Chr(ASCIICode + A) + "." 'Uses numbers. e.g. .1, .2, etc ThisRow.Cell(A, 1).Range.Text = "." & A Next ThisRow.Columns(1).AutoFit 'Turns off the borders. ThisRow.Columns(1).Borders(wdBorderLeft) = False ThisRow.Columns(1).Borders(wdBorderBottom) = False ThisRow.Columns(1).Borders(wdBorderTop) = False ThisRow.Columns(1).Borders(wdBorderHorizontal) = False Next End Sub |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
numbering in tables | Tables | |||
numbering a document line-by-line SKIPPING blank lines... | Page Layout | |||
How do I add line numbering to tables | Tables | |||
Numbering in tables | Microsoft Word Help | |||
Line numbering started adding an {1} to the left of the line numbe | Microsoft Word Help |