I'm trying to replace strings in italics with an italics style. This code returns an error and is incomplete:
Quote:
Sub ITALICS()
For Each myRng In ActiveDocument.StoryRanges
Do
With myRng
Do
With .Find
.MatchWildcards = False
.Text = ""
.Replacement.Text = ""
.Font.Italic
.Wrap = wdFindStop
.Execute
End With
If Find.Found Then
MsgBox Selection.Text
'Replace with Style
Else: Exit Do
End If
myRng.Collapse 0
Loop
End With
Set myRng = myRng.NextStoryRange
Loop Until myRng Is Nothing
Next myRng
End Sub
|