Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Katy M Katy M is offline
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Curly quotes to French Quotes DFT Microsoft Word Help 3 December 9th 06 09:05 PM
Script to change Smart quotes to straight quotes for all users? Michael Microsoft Word Help 1 November 15th 06 06:12 AM
Searching for straight or curly quotemarks Alan New Users 10 August 5th 05 09:03 AM
Can Word be set-up to change curly quotes to straight quotes when. K&D'smom Microsoft Word Help 4 February 19th 05 09:06 AM
Smart Quotes to straight quotes (apostrophe) Elke Microsoft Word Help 6 January 14th 05 05:59 PM


All times are GMT +1. The time now is 10:05 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"