Using 'Find & Replace' to make underlines continuous

M

mack

I have used 'Find & Replace' to underline all the words in my document
that need to be italicised.
PROBLEM:it HASN'T underlined the white spaces between each word in the
sentence.
QUESTION: Is there a way to do this, please?
 
D

Daiya Mitchell

I have used 'Find & Replace' to underline all the words in my document
that need to be italicised.
PROBLEM:it HASN'T underlined the white spaces between each word in the
sentence.
QUESTION: Is there a way to do this, please?

What version, and can you say a little more about how this came about?

If you only wanted to underline specific words (as suggested by using F&R),
why do you want the white spaces underlined?

If you wanted sentences, why not just underline the sentences in the first
place?

And why underline stuff that needs to be italicized?

You can maybe set up some sort of complex wildcard F&R to look for spaces
with underlined text on either side of them, and underline those.
 
M

mack

What version, and can you say a little more about how this came about?

A: Word 2004. Words originally italic. Changed to underline with find
and replace.

If you only wanted to underline specific words (as suggested by using
F&R),
why do you want the white spaces underlined?
A: it's a requirement of the publishing world, for submitting
manuscripts. If there are are little gaps, the first thing an editor
will do is throw your work straight into the 'circular file'. Whole
sentences MUST be underlined woth ONE line, not a whole lot of
separately underlined words.

If you wanted sentences, why not just underline the sentences in the
first
place?
A: Because I first have to SEE what the reader will see. Doing it by
hand is a tall order, as it's an 80 000 word document.
And why underline stuff that needs to be italicized?
FEAR: I am desperately poor, and desperately poor folks don't play
games with editors.

You can maybe set up some sort of complex wildcard F&R to look for
spaces
with underlined text on either side of them, and underline those.
A: If you can please help me to do this, and you will earn my eternal
gratitude. You folks have already saved my bacon once before, and I
will never forget it. Thank you.
 
K

Klaus Linke

You can maybe set up some sort of complex wildcard F&R to look for
It's not so complex, and you don't need wildcards, I think.

For one, make sure you replace italics with a continuous underline.
(There's an option to underline "Words only": Don't use it)

If that still leaves some blanks without underlines, you can search for underlined text (leaving "Find what:" empty), and
Replace with: <ul>^&<ul>

Then,
Find what: <ul> <ul>
Replace with: ^32 ((Format > Font > underlined))
(Instead of the ^32, you can type a blank)

Then delete the remaining <ul> by replacing them with nothing.

You can record those 3 replacements with the macro recorder.

Regards,
Klaus
 
C

Clive Huggan

Mack,

Maybe one of our macro geniuses can help -- but in the meantime these are my
conclusions after some experimentation, including through Find and Replace.

I realize the length of your document is an inhibition against manual
amendments, but at least if you end up having to do it by hand I can give a
couple of suggestions.

You may be doing this anyway, but here goes: In case you are one of the vast
majority that selects words by carefully dragging over them, I'll mention
that the best way to whole words is by double-clicking them and multiples of
words by then dragging (and similarly whole sentences by holding down the
Command (apple) key. (You can leave "When selecting, automatically select
entire word" checked in Preferences, but I don't recommend it -- you keep
more control by unchecking it and double-clicking.)

I created some text in which two adjacent words were underlined (words
only), then I double-clicked and dragged to select them. I clicked Command-u
and the underlining disappeared. I then keyed Command-u again and they
became underlined *including the space between them*.

You could do a macro, but I suspect it's just as quick to select, Command-u
twice and scroll on to the next instance.

Play a nice CD while you're doing it and you'll find some inner peace while
doing this mind-bogglingly frustrating task!

Or maybe someone is going to come along and blow my comments out of the
water with a fantastic macro that seeks those words out, extends the
selection to include the space, and underlines it! ;-)

Cheers,

Clive Huggan
Canberra, Australia
(My time zone is at least 7 hours different from the US and Europe, so my
follow-on responses to those regions can be delayed)
============================================================

* A SUGGESTION ‹ WAIT FOR CONSIDERED ADVICE: If you post a question, keep
re-visiting the newsgroup for several days after the first response comes
in. Sometimes it takes a few responses before the best or complete solution
is proposed; sometimes you'll be asked for further information so that a
better answer can be provided. Good tips about getting the best out of
posting are at http://word.mvps.org/FindHelp/Posting.htm (if you use Safari
and it gives you a blank page the first time, you may need to hit the
circular arrow icon -- "Reload the current page" -- a few times).

* AND ONE MORE ‹ AVOID SPAM: To avoid spam directed at contributors of
newsgroups, you can set up a "send-only" dummy e-mail account. Full
instructions are at http://www.entourage.mvps.org/tips/tip019.html

============================================================
 
D

Daiya Mitchell

You can maybe set up some sort of complex wildcard F&R to look for
It's not so complex, and you don't need wildcards, I think.

I'm pretty sure that ^& is a wildcard, and anything involving wildcards is
complex to me. :)

I was hoping you would come along and take this one, Klaus. :)

Daiya
 
M

mack

For one, make sure you replace italics with a continuous underline.
(There's an option to underline "Words only": Don't use it)
A: What I have done is to replace italics with underline. This means
that there are gaps wherever there is a white space between two or more
italicised words.
Q: Does this mean that I have DONE IT WRONG? Should I go back, turn the
inderlines back to italics and start over (I have also managed to
underline exclamation and question marks, so I don't think I only used
the "whole words" option.

for underlined text (leaving "Find what:" empty), and
Replace with: <ul>^&<ul>
A: I have tried this. When I leave the 'Find what" box empty, it just
finds NON-UNDERLINED text. But what I am looking for is NON-UNDERLINED
WHITE SPACES between underlined words. I imagine that perhaps I should
be typing something else in the 'find what' box.

Find what: <ul> <ul>
A: Yes, I have also typed this command into the 'find what' box.
Perhaps, I am typing it wrong. Is it "hit the underline button" in the
toolbar, and then "type a blank space"? This could be the problem, I
think.
Replace with: ^32 ((Format > Font > underlined))
(Instead of the ^32, you can type a blank)


Then delete the remaining <ul> by replacing them with nothing.
A: I don't understand, but maybe this doesn't matter yet (am trying to
ADD underlines to the WHITE SPACES between underlined words, so that
there are no "NON-UNDERLINED" gaps, and it just looks like one
continuous underlined sentence or phrase. I hope I have explained it
properly.

Thank you for your patience.
 
M

mack

Oops, didn't spot Clive's post. Thank you. But If there is any way to
set it up to do 171 pages of text in one go, it would really help me,
so I will wait and keep my fingers crossed.
 
K

Klaus Linke

If that still leaves some blanks without underlines, you can search
for underlined text (leaving "Find what:" empty), and
Replace with: <ul>^&<ul>
A: I have tried this. When I leave the 'Find what" box empty, it just
finds NON-UNDERLINED text. But what I am looking for is NON-UNDERLINED
WHITE SPACES between underlined words. I imagine that perhaps I should
be typing something else in the 'find what' box.

If you go into "Find what:", then expand the dialog with the "down" button, choose "Format > Font > Underline style" and choose the simple underline ___________, you should find underlined text.
Then the replacements from my first post should work.

If you don't find anything (and I now think this is your problem), try to find "Underline style: Words only". Then you can directly replace that with a single underline (go into "Replace with", then choose Format > Font > Underline style, and choose the simple line ________ below "Words only").

"Words only" doesn't underline spaces.

Regards,
Klaus
 
M

mack

You did it! Thank you Klaus.
try to find "Underline style: Words only". Then you can directly
replace that with a single underline (go into "Replace with", then
choose Format > Font > Underline style, and choose the simple line
________ below "Words only").
SOLUTION: All I had to do was start over again by turning the
underlined text back into italics. Then, in the "Find what" box I left
it blank, but pressed the square "underline" button on the toolbar. In
the "Replace with" box, I hit the blue button on the right-hand side
(little 'up' and 'down' arrows on it). Then I chose Format>Font>
Underline style (I finally saw the "Words only" at the top of the list
that you were trying to tell me about. I chose the ________ and it
worked!
PROBLEM: Any inadvertent "Blank" keystrokes between words have now been
underlined! Have to find a way of weeding them out. Will try to
experiment with putting an underlined white space in the 'find what'
box. your help is much appreciated, Klaus. Thank you very much.
 
M

mack

Alas! i'm not sure that you can help.
PROBLEM: A "messy" look, with white spaces before and after some single
underlined words that have been underlined. i would laugh, but I
suspect that no error is too trivial as far as a submission goes. If I
can't find out how to isolate these spaces, it will have to be done by
hand-- about two days work!
 
C

Clive Huggan

Yes, this is a manifestation of the problem I saw when I experimented before
my post, which is why I thought that Klaus or someone else might end up
devising a macro that would seek an underlined word, extend the selection by
one character (= space) before the underlining, and underline the space by
applying Command-u twice. You would need to apply it manually so as not to
alter the first underlined word in a series (or sentence) that way. But it
would be much quicker than seeking underlined text with a Mark I eyeball and
manually selecting.

But I do not have the capability in VBA... :-\


Cheers,

Clive Huggan
Canberra, Australia
(My time zone is at least 7 hours different from the US and Europe, so my
follow-on responses to those regions can be delayed)
============================================================
 
M

mack

Yes, thank you Clive. I did a "dummies'" version of what you are
talking about by asking "Find/ Replace" to seek out underlined white
spaces between characters, and underlined quote marks. It took HOURS
less time than I feared. Of course, what "Find and Replace really needs
is a voice synthesis program with the spoken command "Get it right!"
Currently, my computer is the only one doing any of the talking. Thanks
for the help.
 
C

Clive Huggan

Yes, thank you Clive. I did a "dummies'" version of what you are
talking about by asking "Find/ Replace" to seek out underlined white
spaces between characters, and underlined quote marks. It took HOURS
less time than I feared. Of course, what "Find and Replace really needs
is a voice synthesis program with the spoken command "Get it right!"
Currently, my computer is the only one doing any of the talking. Thanks
for the help.

Only "Get it right!"? I can think of some adjectival enrichment!

What restraint, Mack!

Cheers,

Clive Huggan
=============
 
M

mack

Yes ... but who would risk being rude to a computer these days?
Personally, I wouldn't talk back to an abacus, even if I could use
one- it would be likely to know some pretty heavy mainframes, and the
consequences could be dire!
 

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