Sub ToggleQuotes() ' ToggleQuotes Macro ' Macro recorded 5-Mar-2002 by Steven Marzuola ' Toggles the Word 'Smart Quote' setting and makes all replacements ' in the current document Dim myMsg As String, thisStatus As Boolean, myStart, myEnd myStart = Selection.Start myEnd = Selection.End Selection.HomeKey Unit:=wdStory thisStatus = Options.AutoFormatAsYouTypeReplaceQuotes If thisStatus Then myMsg = "Turn SmartQuotes off?" Else myMsg = "Turn SmartQuotes on?" End If If (MsgBox(myMsg, vbYesNo) = vbYes) Then Options.AutoFormatAsYouTypeReplaceQuotes = Not thisStatus Options.AutoFormatReplaceQuotes = Not thisStatus End If With Selection.Find .ClearFormatting: .Replacement.ClearFormatting .Wrap = wdFindContinue: .Forward = True .Format = False: .MatchCase = False: .MatchWholeWord = False .MatchWildcards = False: .MatchSoundsLike = False .MatchAllWordForms = False .Text = "'": .Replacement.Text = "'" .Execute Replace:=wdReplaceAll .Text = """": .Replacement.Text = """" .Execute Replace:=wdReplaceAll .Text = "´": .Replacement.Text = "'" .Execute Replace:=wdReplaceAll End With Selection.Start = myStart Selection.End = myEnd End Sub