D
Designingsally
I m trying to find and replace a phrase. I want one word in the replaced
phrase to be in bold. I dont know the bold command and how to go abt it. Can
someone help me thru this if the process is feasiable. I know Font.Bold is
for marking bold. But how do i specify to a particular word in a sentence or
a phrase
For ex:
Click next to continue ' phrase to be found
Click next to continue 'replace with this string, where the next alone shd
be in done for the user during the output.
Dim oRng As Range
Dim sRep As String
Dim sFindText As String
Dim sRepText As String
sFindText = "Click Next to continue" 'Replace to find
sRepText = "Click Next to continue" 'Replace to replace THE "NEXT" HERE SHD
BE REPLACED AS BOLD AS THE OUTPUT.
With Selection
..HomeKey wdStory
With .FInd
..ClearFormatting
..Replacement.ClearFormatting
..Wrap = wdFindContinue
..Format = False
..MatchCase = True
..MatchWholeWord = True
..MatchWildcards = False
..MatchSoundsLike = False
..MatchAllWordForms = False
While .Execute(findText:=sFindText)
Set oRng = Selection.Range
sRep = Msgbox("Use click next to continue")
Wend
phrase to be in bold. I dont know the bold command and how to go abt it. Can
someone help me thru this if the process is feasiable. I know Font.Bold is
for marking bold. But how do i specify to a particular word in a sentence or
a phrase
For ex:
Click next to continue ' phrase to be found
Click next to continue 'replace with this string, where the next alone shd
be in done for the user during the output.
Dim oRng As Range
Dim sRep As String
Dim sFindText As String
Dim sRepText As String
sFindText = "Click Next to continue" 'Replace to find
sRepText = "Click Next to continue" 'Replace to replace THE "NEXT" HERE SHD
BE REPLACED AS BOLD AS THE OUTPUT.
With Selection
..HomeKey wdStory
With .FInd
..ClearFormatting
..Replacement.ClearFormatting
..Wrap = wdFindContinue
..Format = False
..MatchCase = True
..MatchWholeWord = True
..MatchWildcards = False
..MatchSoundsLike = False
..MatchAllWordForms = False
While .Execute(findText:=sFindText)
Set oRng = Selection.Range
sRep = Msgbox("Use click next to continue")
Wend