B
Bob Phillips
I have some code that is looping through all instances of a particular
character style and adds some extra bits to the text. So far so good, but
....
Whatever I do, the replacement text comes out as upper-case, which gives me
a problem. Here is the code. Anyone any idea know how I can get the case I
want?
Sub CharacterStyles(sStyle)
With ActiveDocument.Range.Find
.ClearFormatting
.Style = ActiveDocument.Styles(sStyle)
.Text = ""
.MatchCase = True
.Replacement.ClearFormatting
.Replacement.Text = "<span class='" & LCase(sStyle) & "'>^&</span>"
.Forward = True
.Execute Replace:=wdReplaceAll
End With
End Sub
TIA
Bob
character style and adds some extra bits to the text. So far so good, but
....
Whatever I do, the replacement text comes out as upper-case, which gives me
a problem. Here is the code. Anyone any idea know how I can get the case I
want?
Sub CharacterStyles(sStyle)
With ActiveDocument.Range.Find
.ClearFormatting
.Style = ActiveDocument.Styles(sStyle)
.Text = ""
.MatchCase = True
.Replacement.ClearFormatting
.Replacement.Text = "<span class='" & LCase(sStyle) & "'>^&</span>"
.Forward = True
.Execute Replace:=wdReplaceAll
End With
End Sub
TIA
Bob