View Single Post
 
Old 02-15-2015, 10:16 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,365
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim bOpt1 As Boolean, bOpt2 As Boolean
With Options
  bOpt1 = .AutoFormatAsYouTypeReplaceQuotes
  bOpt2 = .AutoFormatReplaceQuotes
  .AutoFormatAsYouTypeReplaceQuotes = False
  .AutoFormatReplaceQuotes = False
End With
With ActiveDocument
  With .Range.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Format = False
    .Forward = True
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Wrap = wdFindContinue
    .Text = " "
    .Replacement.Text = "', '"
    .Execute Replace:=wdReplaceAll
    .Text = "^13"
    .Replacement.Text = "'),^p('"
    .Execute Replace:=wdReplaceAll
  End With
  .Range.Paragraphs.Last.Range.Cut
  .Range(0, 0).Paste
  .Range.Paragraphs.First.Range.Characters.Last.Delete
End With
With Options
  .AutoFormatAsYouTypeReplaceQuotes = bOpt1
  .AutoFormatReplaceQuotes = bOpt2
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote