Remove single quotation marks not apostrophes

G

greggsewell

I have a 200-plus-page document with many words and phrases surrounded by
single quotation marks. These have all been replaced with smart (curly)
quotation marks.

I need to remove all of the single quotation marks but leave the apostrophes
in contractions alone.

Examples:

Need to remove:

'Bob'
'Bob and friends'
'Bob and many friends'
etc.

Need to leave alone:

don't
we'll
can't

I've read and read on the topic of Find and Replace, regular expressions,
and wildcards. It seems to me that Word's Find and Replace can do this, but I
cannot find an example that shows me how, and I'm not expert enough to deduce
on my own how to set up a regular expression to get the job done.

I'm using Microsoft Word X for Mac Service Release 1

Thanks for your help.
 
G

grammatim

You could use Find-Replace: type in the first box Space-Apostrophe,
leave the second box empty, and click Replace All; then change the
first box to Apostrophe-Space and choose Replace All again. This will
catch all except the ones at the start or end of a paragraph; to
remove those, do it twice more with ^p-Apostrophe and with Apostrophe-
^p (don't type the hyphen in any of the four, of course!)
 
G

greggsewell

Ah!

Thank you, thank you. I was trying to make it more complex than it has to be.

All best,

Gregg
 
S

Suzanne S. Barnhill

Note, however, that this won't take care of cases where there is punctuation
after the single quote (UK style).
 
G

greggsewell

Quite right, Suzanne. Fortunately, the manuscript I'm copyediting is American
style.

I appreciate your input.

Gregg
 
G

Graham Mayor

If these are single smart quotes then the following macro should remove them
all whilst leaving smart apostrophes.

Sub RemoveSingleQuotes()
Dim vFindText As Variant
Dim vReplText As Variant
Dim i As Long

vFindText = Array(Chr(145), "^0146([!a-z])")
vReplText = Array("", "\1")
With Selection
.HomeKey Unit:=wdStory
With .Find
.ClearFormatting
.Replacement.ClearFormatting
.Forward = True
.Wrap = wdFindContinue
.MatchWholeWord = True
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
.Format = True
.MatchCase = True

For i = LBound(vFindText) To UBound(vFindText)
.Text = vFindText(i)
.Replacement.Text = vReplText(i)
.Execute replace:=wdReplaceAll
Next i
End With
End With
End Sub

http://www.gmayor.com/installing_macro.htm
 

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