Click here to Skip to main content
15,883,883 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dim MyText As String
MyText = "You can see the specialist you choose without permission from this plan."
Selection.TypeText (MyText)
With ActiveDocument.Content.Find
.ClearFormatting
.Font.Bold = False
With .Replacement
.ClearFormatting
.Font.Bold = True
.Font.Underline = wdUnderlineSingle
End Sub
End With
.Execute FindText:="specialist", ReplaceWith:="", _
Format:=True, Replace:=wdReplaceAll
End With
End Sub

Just i need to bold and underline only in the above paragraph Mytext.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900