Reply
 
Thread Tools Display Modes
  #1   Report Post  
Xero
 
Posts: n/a
Default Need help numbering lines

Hello, I am using Word 2003.

I'm writing a documentation from a program and I need to cite some program
code - you know, those lengthly stuff. I have to number the lines for easier
reference.

I created a table of one row and two columns and reduce the width of the
left column. The line numbers are put in the left column and the program code
is put in the right column.

I used to type the line numbers one by one. But now I have come across a
program with ten-thousand lines. Is there a smarter way of numbering the
lines?

Thanks.
--
Xero

http://www.chezjeff.net
My personal web portal
  #2   Report Post  
Jay Freedman
 
Posts: n/a
Default

On Sun, 2 Jan 2005 06:13:04 -0800, "Xero"
(remove_underscores_and_this ) wrote:

Hello, I am using Word 2003.

I'm writing a documentation from a program and I need to cite some program
code - you know, those lengthly stuff. I have to number the lines for easier
reference.

I created a table of one row and two columns and reduce the width of the
left column. The line numbers are put in the left column and the program code
is put in the right column.

I used to type the line numbers one by one. But now I have come across a
program with ten-thousand lines. Is there a smarter way of numbering the
lines?

Thanks.


Yes, look in the help for the topic about the SEQ field. You can
insert one in the first cell, copy it, select the whole column, and
paste. Then, while they're still all selected, press F9 to update the
fields.

Be aware that Word has difficulty with extremely long tables (see
http://www.word.mvps.org/FAQs/TblsFl...FastTables.htm). You may
need to break the table every 5 pages or so. This won't affect the SEQ
fields.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
  #3   Report Post  
Xero
 
Posts: n/a
Default

Hello.

I have searched for SEQ and came up with this web page:
http://office.microsoft.com/en-us/as...861901033.aspx

I followed the instructions on the page but it didn't work. It numbered the
table, not the lines.

Could you be more specific on how to do it? Thanks again.

Xero
"Jay Freedman" wrote:

On Sun, 2 Jan 2005 06:13:04 -0800, "Xero"
(remove_underscores_and_this ) wrote:

Hello, I am using Word 2003.

I'm writing a documentation from a program and I need to cite some program
code - you know, those lengthly stuff. I have to number the lines for easier
reference.

I created a table of one row and two columns and reduce the width of the
left column. The line numbers are put in the left column and the program code
is put in the right column.

I used to type the line numbers one by one. But now I have come across a
program with ten-thousand lines. Is there a smarter way of numbering the
lines?

Thanks.


Yes, look in the help for the topic about the SEQ field. You can
insert one in the first cell, copy it, select the whole column, and
paste. Then, while they're still all selected, press F9 to update the
fields.

Be aware that Word has difficulty with extremely long tables (see
http://www.word.mvps.org/FAQs/TblsFl...FastTables.htm). You may
need to break the table every 5 pages or so. This won't affect the SEQ
fields.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

  #4   Report Post  
Jay Freedman
 
Posts: n/a
Default

If you followed the instruction in that help topic about using the Caption
command, that's not what I meant. You can't use that command for your
purpose. Instead, you must use the Insert Field command to make the first
SEQ field, and copy/paste to make more.

As I reread your original post, I think I misunderstood. Does your table
have only one row containing all the lines, or do you have each line in a
separate row? If it's only one row, then:
- insert the first SEQ field at the beginning of the first cell
- press Enter
- copy the SEQ field and the paragraph mark
- move down to the next line
- paste
- repeat the move-and-paste as needed
- select all the SEQ fields and press F9

If you have hundreds of lines to number, you can speed up the copy/paste a
lot: After the first paste, copy both lines and paste; then copy the four
lines and paste, then copy eight lines, etc.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

Xero wrote:
Hello.

I have searched for SEQ and came up with this web page:
http://office.microsoft.com/en-us/as...861901033.aspx

I followed the instructions on the page but it didn't work. It
numbered the table, not the lines.

Could you be more specific on how to do it? Thanks again.

Xero
"Jay Freedman" wrote:

On Sun, 2 Jan 2005 06:13:04 -0800, "Xero"
(remove_underscores_and_this ) wrote:

Hello, I am using Word 2003.

I'm writing a documentation from a program and I need to cite some
program code - you know, those lengthly stuff. I have to number the
lines for easier reference.

I created a table of one row and two columns and reduce the width
of the left column. The line numbers are put in the left column and
the program code is put in the right column.

I used to type the line numbers one by one. But now I have come
across a program with ten-thousand lines. Is there a smarter way of
numbering the lines?

Thanks.


Yes, look in the help for the topic about the SEQ field. You can
insert one in the first cell, copy it, select the whole column, and
paste. Then, while they're still all selected, press F9 to update the
fields.

Be aware that Word has difficulty with extremely long tables (see
http://www.word.mvps.org/FAQs/TblsFl...FastTables.htm). You may
need to break the table every 5 pages or so. This won't affect the
SEQ fields.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org



  #5   Report Post  
Xero
 
Posts: n/a
Default

That's handy!
Thanks very much, Jay!

Xero
"Jay Freedman" wrote:

If you followed the instruction in that help topic about using the Caption
command, that's not what I meant. You can't use that command for your
purpose. Instead, you must use the Insert Field command to make the first
SEQ field, and copy/paste to make more.

As I reread your original post, I think I misunderstood. Does your table
have only one row containing all the lines, or do you have each line in a
separate row? If it's only one row, then:
- insert the first SEQ field at the beginning of the first cell
- press Enter
- copy the SEQ field and the paragraph mark
- move down to the next line
- paste
- repeat the move-and-paste as needed
- select all the SEQ fields and press F9

If you have hundreds of lines to number, you can speed up the copy/paste a
lot: After the first paste, copy both lines and paste; then copy the four
lines and paste, then copy eight lines, etc.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

Xero wrote:
Hello.

I have searched for SEQ and came up with this web page:
http://office.microsoft.com/en-us/as...861901033.aspx

I followed the instructions on the page but it didn't work. It
numbered the table, not the lines.

Could you be more specific on how to do it? Thanks again.

Xero
"Jay Freedman" wrote:

On Sun, 2 Jan 2005 06:13:04 -0800, "Xero"
(remove_underscores_and_this ) wrote:

Hello, I am using Word 2003.

I'm writing a documentation from a program and I need to cite some
program code - you know, those lengthly stuff. I have to number the
lines for easier reference.

I created a table of one row and two columns and reduce the width
of the left column. The line numbers are put in the left column and
the program code is put in the right column.

I used to type the line numbers one by one. But now I have come
across a program with ten-thousand lines. Is there a smarter way of
numbering the lines?

Thanks.

Yes, look in the help for the topic about the SEQ field. You can
insert one in the first cell, copy it, select the whole column, and
paste. Then, while they're still all selected, press F9 to update the
fields.

Be aware that Word has difficulty with extremely long tables (see
http://www.word.mvps.org/FAQs/TblsFl...FastTables.htm). You may
need to break the table every 5 pages or so. This won't affect the
SEQ fields.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org






  #6   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

Another approach, if each line of code is in a separate row, is to create a
separate column for the numbers and then just click on the Numbering button
to insert numbering. You may need to fine-tune the number formatting, but
this is a quick-and-dirty way to accomplish what you need.

Also, be aware that if line numbers are all you need (as opposed to
"instruction" numbers), you can apply line numbering to ordinary text (but
not text in a table) using the command on the Layout tab of Page Setup.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Jay Freedman" wrote in message
...
If you followed the instruction in that help topic about using the Caption
command, that's not what I meant. You can't use that command for your
purpose. Instead, you must use the Insert Field command to make the

first
SEQ field, and copy/paste to make more.

As I reread your original post, I think I misunderstood. Does your table
have only one row containing all the lines, or do you have each line in a
separate row? If it's only one row, then:
- insert the first SEQ field at the beginning of the first cell
- press Enter
- copy the SEQ field and the paragraph mark
- move down to the next line
- paste
- repeat the move-and-paste as needed
- select all the SEQ fields and press F9

If you have hundreds of lines to number, you can speed up the copy/paste a
lot: After the first paste, copy both lines and paste; then copy the four
lines and paste, then copy eight lines, etc.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

Xero wrote:
Hello.

I have searched for SEQ and came up with this web page:
http://office.microsoft.com/en-us/as...861901033.aspx

I followed the instructions on the page but it didn't work. It
numbered the table, not the lines.

Could you be more specific on how to do it? Thanks again.

Xero
"Jay Freedman" wrote:

On Sun, 2 Jan 2005 06:13:04 -0800, "Xero"
(remove_underscores_and_this ) wrote:

Hello, I am using Word 2003.

I'm writing a documentation from a program and I need to cite some
program code - you know, those lengthly stuff. I have to number the
lines for easier reference.

I created a table of one row and two columns and reduce the width
of the left column. The line numbers are put in the left column and
the program code is put in the right column.

I used to type the line numbers one by one. But now I have come
across a program with ten-thousand lines. Is there a smarter way of
numbering the lines?

Thanks.

Yes, look in the help for the topic about the SEQ field. You can
insert one in the first cell, copy it, select the whole column, and
paste. Then, while they're still all selected, press F9 to update the
fields.

Be aware that Word has difficulty with extremely long tables (see
http://www.word.mvps.org/FAQs/TblsFl...FastTables.htm). You may
need to break the table every 5 pages or so. This won't affect the
SEQ fields.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org




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
line breaking rules or lines wrap like work 6.0 carvin5string Microsoft Word Help 1 December 29th 04 07:01 PM
Bad Bullets and Numbering Delay JohnThePresenter Microsoft Word Help 3 December 15th 04 11:07 PM
Change Line Count to not count blank lines Carol Microsoft Word Help 4 November 27th 04 01:46 PM
can't restart numbering BG Microsoft Word Help 0 November 24th 04 03:41 PM
numbering in text box Cath Microsoft Word Help 2 November 24th 04 03:15 PM


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