Converting straight quotes to curly quotes and apostrophes

R

Randolph

I have documents I need to convert all straight quotes to
curly quotes. There is a Knowledge base article on this
that makes no sense to me. It says to do a REPLACE using
Find what => a quotation mark and Replace with => a
quotation mark. All that seems to do is search for
quotation marks! What are they talking about? Even when
I click the USE WILDCARDS box it just changes all text to
quotation marks.

Also, is there a way to do a search and replace where the
search is for a pair of characters (like quotation marks)
or formatting with different text in between? For e.g.
if I wanted it to find every incidence where two
Paragraph marks were followed by text and then a single
Paragraph mark and replace it to two line brakes, text
unchanged followed by a paragraph mark?
 
J

Jay Freedman

Hi, Randolph,

Look at the first two steps in
http://www.mvps.org/word/FAQs/MacrosVBA/ReplaceQuotes.htm. I think you may
have missed setting the AutoCorrect item (step 1). When that is set and you
replace quotes with quotes, the act of replacement triggers the AutoCorrect
to insert curly quotes.

The answer to your second question is to use wildcards -- but that's a
complex subject. See
http://www.mvps.org/word/FAQs/General/UsingWildcards.htm for information.
For your example, the search string would be

^13^13(*^13)

and the replacement string would be

^l^l\1
 
K

Klaus Linke

if I wanted it to find every incidence where two
For your example, the search string would be

^13^13(*^13)

and the replacement string would be

^l^l\1


You don't want to clobber the paragraph mark that ended the previous
paragraph (since you would loose the style of this paragraph).

To make sure you only match two *empty* paragraphs, include the previous
paragraph mark:

Find what: (^13)^13^13([!^13])
Replace with: \1^l^l\2

I re-used the previous paragraph mark (\1): This should make sure that this
paragraph keeps it's style.

The reason why I replaced (*^13) with ([!^13]) in Jay's expression: I want
to make sure the two line breaks ^l^l end up at the start of a paragraph
that contains text. This makes a difference when there may be more than two
empty paragraphs in a row sometimes.

It would be better to then define a new style with a "space before" of two
lines, and replace ^l^l with this style, then delete ^l^l (replace with
nothing).

Regards,
Klaus
 

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