one line number for a wrapped line

J

Jerry

I've inherited a Word macro that reformats an ASCII input file to a format
suitable for printing. One of the functions is to turn on line numbers. This
works fine except for lines in the original that are longer than the page
width. The line wraps to the next line and each of those wrapped lines has a
line number. Is there some way to set it up so that only one line number is
shown for a shown for each input line? I only need to be able to run the
macro and print the result. I don't need to save the reformatted output.

Current behavior:
1 This is first line that
2 wraps to another
3 This is the second line

Desired:
1 This is first line that
wraps to another
2 This is the second line
 
J

Jay Freedman

Hi Jerry,

That's not possible with the line numbers feature -- they are *line*
numbers, not paragraph numbers, so they number every line.

Your alternatives are (a) choose your formatting (font, size, indents,
margins, paper size) so that there are no wrapped lines or (b) number the
paragraphs instead of the lines. The latter is much more complicated.
 
K

Klaus Linke

or (b) number the paragraphs instead of the lines.
The latter is much more complicated.

Not necessarily. In Word2003, you could try to apply a list style to the
whole document (Ctrl+A, "Format > Bullets and Numbering... > List styles).
That shouldn't mess with your paragraph styles or formatting much, and you
can later set it back to "No list".

The numbers will appear in the formatting of the paragraph's style.
You can "Modify..." the list style to, say, Arial 8 pt, to make it look
more consistent.

Greetings,
Klaus
 
J

Jerry

Klaus Linke said:
Not necessarily. In Word2003, you could try to apply a list style to the
whole document (Ctrl+A, "Format > Bullets and Numbering... > List styles).
That shouldn't mess with your paragraph styles or formatting much, and you
can later set it back to "No list".

The numbers will appear in the formatting of the paragraph's style.
You can "Modify..." the list style to, say, Arial 8 pt, to make it look
more consistent.

Greetings,
Klaus

Got this working. Set up a list style to do this. The only problem I had was
the tabs in the source file caused the list to interpret it as more of an
outline so indented lines got their own sub-numbering. Could well be my lack
of understanding on setting list properties :^) I tried changing each tab
to a fixed number of spaces first but that didn't help. What does work is to
change each tab to fixed set of characters (I used Q#Q#), apply the list
style, and then change Q#Q# to 4 spaces. Not elegant but it it works.
 

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