Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub SplitItalic()
- Selection.HomeKey wdStory
- With Selection.Find
- .ClearFormatting
- .ClearHitHighlight
- .Text = ""
- .Font.Italic = True
- While (.Execute)
- If Not Selection.Characters.First.Previous.Font.Italic And _
- Selection.Characters.First.Previous.Text Like "[! ,.:;?!-]" Then
- Selection.InsertBefore " "
- ElseIf Not Selection.Characters.Last.Next.Font.Italic And _
- Selection.Characters.Last.Next.Text Like "[! ,.:;?!-]" Then
- Selection.InsertAfter " "
- End If
- Wend
- End With
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement