Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
line breaking rules or lines wrap like work 6.0 | Microsoft Word Help | |||
Bad Bullets and Numbering Delay | Microsoft Word Help | |||
Change Line Count to not count blank lines | Microsoft Word Help | |||
can't restart numbering | Microsoft Word Help | |||
numbering in text box | Microsoft Word Help |