V
Vince
This is crazy. I am trying to change the style "COOL" in the document to
another style called "NOTSOCOOL". I wrote this:
With ActiveDocument.Range.Find
.Style = "COOL"
.ClearFormatting
.MatchWildcards = False
With .Replacement
.Style = "NOTSOCOOL"
End With
.Execute Replace:=wdReplaceAll
End With
Doesn't work! I am positive that nothing extra is set, the same code (when
..style is removed and .text is added) finds and replaces words with no
problems. The styles definitely exist and I did a manual Find and Replace
(Edit - Find) and it works fine.
What's wrong with the code?
Thank you for your time / response
Vince
another style called "NOTSOCOOL". I wrote this:
With ActiveDocument.Range.Find
.Style = "COOL"
.ClearFormatting
.MatchWildcards = False
With .Replacement
.Style = "NOTSOCOOL"
End With
.Execute Replace:=wdReplaceAll
End With
Doesn't work! I am positive that nothing extra is set, the same code (when
..style is removed and .text is added) finds and replaces words with no
problems. The styles definitely exist and I did a manual Find and Replace
(Edit - Find) and it works fine.
What's wrong with the code?
Thank you for your time / response
Vince