Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Journey51 Journey51 is offline
external usenet poster
 
Posts: 14
Default Line Numbering in 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   Report Post  
Posted to microsoft.public.word.tables
Tom Conrad Tom Conrad is offline
external usenet poster
 
Posts: 88
Default Line Numbering in 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   Report Post  
Posted to microsoft.public.word.tables
Journey51 Journey51 is offline
external usenet poster
 
Posts: 14
Default Line Numbering in 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   Report Post  
Posted to microsoft.public.word.tables
David Sisson[_2_] David Sisson[_2_] is offline
external usenet poster
 
Posts: 1
Default Line Numbering in 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   Report Post  
Posted to microsoft.public.word.tables
SueT SueT is offline
external usenet poster
 
Posts: 5
Default Line Numbering in 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
numbering in tables F Jolivette Tables 1 December 1st 06 07:54 PM
numbering a document line-by-line SKIPPING blank lines... Number nutso Page Layout 2 October 26th 06 11:27 PM
How do I add line numbering to tables Tiddy McNipples Tables 1 October 16th 06 08:29 AM
Numbering in tables BarryD Microsoft Word Help 2 September 23rd 06 02:29 PM
Line numbering started adding an {1} to the left of the line numbe mich Microsoft Word Help 1 August 4th 05 03:47 PM


All times are GMT +1. The time now is 03:25 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"