View Single Post
 
Old 11-17-2025, 06:13 AM
gmaxey gmaxey is offline Windows 10 Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,634
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

I obviously don't understand what you are trying to achieve. What exactly is wrong and what exactly are your wanting to accomplish?


Perhaps:


Code:
Sub AngleQuotationMarks()
Dim iType As Long
Dim oRng As Range
  Options.AutoFormatAsYouTypeReplaceQuotes = False
  For iType = 1 To 1 '2
    On Error GoTo lbl_Exit
    Set oRng = ActiveDocument.StoryRanges(iType)
    With oRng.Find
      .ClearFormatting
      .Replacement.ClearFormatting
      .Wrap = wdFindStop
      .Format = False
      .MatchWildcards = True
      .Text = "([! " & Chr(9) & Chr(11) & Chr(13) & Chr(160) & "])" & "(^0171)"
      .Replacement.Text = "\1" & "^0187"
      .Execute Replace:=wdReplaceAll
    End With
  Next iType
lbl_Exit:
  'Options.AutoFormatAsYouTypeReplaceQuotes = True
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/

Last edited by gmaxey; 11-17-2025 at 08:50 AM.
Reply With Quote