Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. Sub ChangeColorWithReplace()
  2. Selection.Find.ClearFormatting
  3. Selection.Find.Font.Color = wdColorRed
  4. Selection.Find.Replacement.ClearFormatting
  5. Selection.Find.Replacement.Font.Color = wdColorBlack
  6. With Selection.Find
  7. .Text = ""
  8. .Replacement.Text = ""
  9. .Forward = True
  10. .Wrap = wdFindContinue
  11. .Format = True
  12. .MatchCase = False
  13. .MatchWholeWord = False
  14. .MatchKashida = False
  15. .MatchDiacritics = False
  16. .MatchAlefHamza = False
  17. .MatchControl = False
  18. .MatchByte = False
  19. .MatchWildcards = False
  20. .MatchSoundsLike = False
  21. .MatchAllWordForms = False
  22. End With
  23. Selection.Find.Execute Replace:=wdReplaceAll
  24. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement