Find & fix "orphan" words?

G

Gary McGill

Hi,

Does anyone have any experience of fixing "orphan" words in Word? By
"orphan" I mean a word that's on a line on its own at the end of a
paragraph. I'd like to automatically find words like this and put in a soft
line break in the line above so that the text looks better.

Thanks,
Gary
 
G

Graham Mayor

Have you checked out the Widows & Orphans paragraph formatting option?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Gary McGill

Graham,

Yes, I have - but that seems to deal with widow lines, not words. So, if the
last line in a paragraph spills onto the next page, it'll move the whole
paragraph - but as far as I can tell it doesn't do the same thing with
words.

I want to change the following:

The quick brown fox
jumped over the lazy
dog.

....to:

The quick brown fox
jumped over the
lazy dog.

....irrespective of whether that paragraph is the first or last on the page,
or somewhere in the middle.

Gary
 
H

Helmut Weber

Hi Gary,

hardly possible in the way you might think,
because of Word's definition of a word.
rather complicated, slow,
and will lead to a typographical catastrophy, probably.

Search for a paragraph mark.
Count the words in the line of the paragraph mark.
If the number of words is one, get the paragraph number.
Move the selection up one line, which isn't possible
if you are in a one lined paragraph 1,
check whether you are still in the same paragraph,
if so, find the last word in that line,
insert a line break before it.

I haven't checked, in what line a word would be,
which is hyphenated...

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
G

Graham Mayor

There's an additional issue in that Word is not a page layout application
and the page endings are volatile and affected by a wide variety of
factors - not least of which would be the current printer driver.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Gary McGill

Again, I'm not really interested in page endings - I'm dealing with
paragraphs in the middle of the page as well as the start and end.

From what everyone's saying, the answer is "no, there's no easy way to do
it". I'll roll my own.

Thanks all.
 

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