first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

Microsoft Word 2000 VBA: Inserting HTML Tags into a Range; Programmatic Find/Replace

Dim objRange As Range Set objRange = Application.ActiveDocument.Range With objRange.Find Call .ClearFormatting .Font.Bold = True .Format = True .Forward = True .Highlight = False .MatchAllWordForms = False .MatchCase = False .MatchSoundsLike = False .MatchWholeWord = True .MatchWildcards = True .NoProofing = False .Text = vbNullString .Wrap = wdFindContinue

With .Replacement
    Call .ClearFormatting
    .Text = "<strong>^&<\\strong>"
End With
Call .Execute(Replace:=wdReplaceAll)

End With

mod date: 2004-04-11T08:32:01.000Z