![]() |
#1
|
|||
|
|||
![]()
I'd like to find a text in a selection and change only a part of the found text by boldfacing it.
For example, first find the text "hello there" in the present selection (e.g. first page of document), then boldface only "there". Could it be done? I am struggling with the following sort of VB code. FYI, wildcards are in use. Selection.Find.ClearFormatting Selection.Find.Replacement.Font.Bold = True (??????????) With Selection.Find .text = "(hello)*(there)" .Replacement.text = (???????????) .Forward = True .MatchWildcards = True .Wrap = wdFindStop .Format = False .MatchCase = False .MatchWholeWord = False .MatchByte = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
ksigcajun | Word VBA | 1 | 03-16-2015 07:51 PM |
Microsoft Word macro to find text, select all text between brackets, and delete | helal1990 | Word VBA | 4 | 02-05-2015 03:52 PM |
![]() |
rsrasc | Word VBA | 3 | 11-11-2014 03:55 PM |
![]() |
redzan | Word VBA | 1 | 07-27-2014 03:35 PM |
how to search and replace BOLD text >> font color change? | dylansmith | Word | 4 | 03-12-2013 09:51 PM |