C
Chris
Hi,
i have a macro which formats the text between Html-Tags like <U1>Text</U1>
with standard header styles. The problem is that my whole document will be
replaced with this format style. But i only want to format the text between
the HTML-Tags.
Her is my snippet:
With ActiveDocument.Range.Find
.ClearFormatting
.Replacement.ClearFormatting
.Format = True
.MatchWildcards = True
.Text = "(\<U1\>)(*)(\</U1\>)"
.Replacement.Text = "\2"
.Replacement.Style =
ActiveDocument.Styles(WdBuiltinStyle.wdStyleHeading1)
.Execute Replace:=wdReplaceAll
End With
Many thanks for any advice...
Chris
i have a macro which formats the text between Html-Tags like <U1>Text</U1>
with standard header styles. The problem is that my whole document will be
replaced with this format style. But i only want to format the text between
the HTML-Tags.
Her is my snippet:
With ActiveDocument.Range.Find
.ClearFormatting
.Replacement.ClearFormatting
.Format = True
.MatchWildcards = True
.Text = "(\<U1\>)(*)(\</U1\>)"
.Replacement.Text = "\2"
.Replacement.Style =
ActiveDocument.Styles(WdBuiltinStyle.wdStyleHeading1)
.Execute Replace:=wdReplaceAll
End With
Many thanks for any advice...
Chris