line numbering with tables

J

Jules

I have a document that needs to have the lines numbered every tenth line.
The document is part plain text and part tables. Word's auto line numbering
by default does not number lines in tables and therefore my line numbering in
the document is not correct. Is there a way around this so that the line
numbering will also number the tables or would I have to do this manually?

thanks,
 
S

Stefan Blom

You would have to do the numbering manually. Anchor a text box to the
header, drag it into the left (or right) margin and type in the numbers. For
text lines and numbers to line up, you will have to use an exact value for
line spacing in the document.
 
T

TonyK

Hi Jules

This Macro code should achieve what you want. The assumption is that you
have an empty column at the left hand side of your table. There is probably
a much cleaner way of writing the VBA code but I am not a programmer I just
like playing with VBA Macros.

Sub RowNumbering()
'
' RowNumbering Macro
' Macro recorded 02/07/2008 by Tony King
'
Dim Counter
Dim Rows
Selection.GoTo What:=wdGoToTable, Which:=wdGoToFirst, Count:=1, Name:=""
Rows = Selection.Information(wdMaximumNumberOfRows)
Counter = Rows / 10
For Count = 1 To Rows / 10
Selection.TypeText Text:=Count
Selection.MoveDown Unit:=wdLine, Count:=Count + 9
Next Count
MsgBox ("Completed Row Numbering")
Selection.HomeKey Unit:=wdStory
End Sub

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top