Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Quotes again-can't replace curly with straight
Hi,
I'm reviewing a Word 2003 SP1 document, and some of the apostrophes are curved, some are straight. Worst of all, some of the end quotes are curved wrong, and there are quite a few in this document (background-the document is generated from AuthorIT, but I've been told that quote formatting is determined by Word). I've tried several approaches, including using the search and replace, but am not confident I've found them all. The best bet seems to be to make them all straight. But when I've tried changing them using the auto correct function, nothing happens (I have unchecked the "replace straight with curly" box). Any suggestions would be highly appreciated. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Quotes again-can't replace curly with straight
The following macro should replace the smart quotes (and the characters
often confused with quotes) in a document with plain quotes. Sub ReplaceSmartQuotes() Dim vFindText As Variant Dim vReplText As Variant Dim sQuotes As Boolean Dim i As Long Selection.HomeKey wdStory sQuotes = Options.AutoFormatAsYouTypeReplaceQuotes Options.AutoFormatAsYouTypeReplaceQuotes = False vFindText = Array(Chr(180), Chr(96), Chr(145), Chr(146), Chr(147), Chr(148)) vReplText = Array(Chr(39), Chr(39), Chr(39), Chr(39), Chr(34), Chr(34)) 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 '*************************** 'Activate the following lines to reformat with smart quotes 'With Options ' .AutoFormatAsYouTypeReplaceQuotes = True ' .AutoFormatReplaceQuotes = True 'End With 'Selection.Range.AutoFormat '*************************** Options.AutoFormatAsYouTypeReplaceQuotes = sQuotes End Sub http://www.gmayor.com/installing_macro.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Katy M wrote: Hi, I'm reviewing a Word 2003 SP1 document, and some of the apostrophes are curved, some are straight. Worst of all, some of the end quotes are curved wrong, and there are quite a few in this document (background-the document is generated from AuthorIT, but I've been told that quote formatting is determined by Word). I've tried several approaches, including using the search and replace, but am not confident I've found them all. The best bet seems to be to make them all straight. But when I've tried changing them using the auto correct function, nothing happens (I have unchecked the "replace straight with curly" box). Any suggestions would be highly appreciated. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Curly quotes to French Quotes | Microsoft Word Help | |||
Script to change Smart quotes to straight quotes for all users? | Microsoft Word Help | |||
Searching for straight or curly quotemarks | New Users | |||
Can Word be set-up to change curly quotes to straight quotes when. | Microsoft Word Help | |||
Smart Quotes to straight quotes (apostrophe) | Microsoft Word Help |