# Replace single quotes by double quotes



## purnima (Nov 3, 2005)

Hi,
How do I replace single quotes by double quotes in a word document using VBA?A recorded macro works fine but it also changes apostrophes like in words such as can't or don't.


----------



## jdc (Nov 4, 2005)

Hi

Have you tried replacing ( ') with ( ")  and then (' ) with (" ) ignore the brackets, ie a space and a quote, that will eliminate picking up the single quotes within words.

HTH

John


----------



## purnima (Nov 5, 2005)

Thankyou.That works.I have one more query. Is it possible to use wildcard characters to replace single quotes by double quotes?

I tried to replace this:

(')(*)(')

By:

(")(*)(")

But it doesn't seem to work.
Thanx.


----------



## jdc (Nov 5, 2005)

Hi

You can use wildcards to find a selection but you have trouble when you try to replace with wildcards, it will replace with an asterisk rather than the included text.

HTH

John


----------

