View Single Post
 
Old 02-15-2019, 10:04 AM
kilroy kilroy is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Sep 2016
Location: Southern Ontario
Posts: 122
kilroy is on a distinguished road
Default

If it's one thing I've learned here it's if your code doesn't work you've done something wrong and it's your fault. You can't share code why? Have a better attitude if you want help.

This works for me:

Code:
Sub ModifyStyle()
'
'
'
    Selection.Find.ClearFormatting
    Selection.Find.Style = ActiveDocument.Styles("Quote") 'Your Style Here
    Selection.Find.Replacement.ClearFormatting
    Selection.Find.Replacement.Font.Size = 14
    Selection.Find.Replacement.Font.Bold = True
    Selection.Find.Replacement.Font.Italic = True
    With Selection.Find
        .Text = "?"
        .Replacement.Text = "^&"
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchByte = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Reply With Quote