Replace Inverted Commas

F

FARAZ QURESHI

Whenever I carry out a Find + Replace exercise to insert Inverted Commas,
i.e. ", the same are curved in the stylish manner.

Any way of replacing existing/inserting unformatted simple straight commas
like displayed in the symbols' character set?

Thanx in advance.
 
G

Graham Mayor

You will need a macro :)

Sub ReplaceQuotes()
Dim vFindText As Variant
Dim vReplText As Variant
Dim sFormat As Boolean
Dim i As Long
sFormat = Options.AutoFormatAsYouTypeReplaceQuotes
vFindText = Array(Chr(147), Chr(148), Chr(145), Chr(146))
vReplText = Array(Chr(34), Chr(34), Chr(39), Chr(39))
Options.AutoFormatAsYouTypeReplaceQuotes = False
Selection.HomeKey wdStory
With Selection.Find
.Forward = True
.Wrap = wdFindContinue
.MatchWholeWord = True
.MatchWildcards = False
.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
Options.AutoFormatAsYouTypeReplaceQuotes = sFormat
End Sub

http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
T

Tony Jollans

I do not understand whether you wish to use straight quotes or curly quotes,
but Word offers the choice.

Under Tools > AutoCorrect Options > AutoFormat as you type tab, there is a
checkbox labeled "replace straight quotes with curly quotes". if you want
curly quotes, check this box; if you want straight quotes, uncheck this box.
Then, under Find and Replace, enter " in the Find what box, and also enter "
in the Replace with box, and press Replace All.
 
G

grammatim

What is already in your text, that you are replacing with quotation
marks?

As Tony said, you can have either straight or curly quotes by checking
or clearing the appropriate formatting box. And this also lets you
change from one to the other.
 

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