View Single Post
 
Old 04-07-2015, 08:20 PM
Guessed's Avatar
Guessed Guessed is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,164
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

This modification to Graham's code would include the footnotes and other document storyranges.
Code:
Sub Demo()
  Const strList As String = ".|,|:|;|?|!"
  Dim vChar As Variant
  Dim i As Long
  Dim oRng As Range
  vChar = Split(strList, "|")
  For i = LBound(vChar) To UBound(vChar)
    For Each oRng In ActiveDocument.StoryRanges
      With oRng.Find
        Do While .Execute(vChar(i))
          oRng.Start = oRng.Start - 1
          If oRng.Characters(1).Font.Italic = True Then
            oRng.Font.Italic = True
          End If
          oRng.Collapse 0
        Loop
      End With
    Next oRng
  Next i
lbl_Exit:
  Exit Sub
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote