![]() |
#2
|
||||
|
||||
![]()
If you want to restrict the find to a particular font format, you need to specify those parameters. For example:
Code:
With oRng.Find .ClearFormatting .Replacement.ClearFormatting .Text = rFindText With .Font .Bold = True .ColorIndex = wdTurquoise .Size = 16 End With .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = True .MatchCase = True .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Execute Do While .Found = True .FormattedText = rReplacement.FormattedText .Collapse wdCollapseEnd .Execute Loop End With
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
jc491 | Word VBA | 8 | 09-30-2015 06:10 AM |
Macro to keep formatted form fields after mail merge or replace text with formatted form fields | jer85 | Word VBA | 2 | 04-05-2015 10:00 PM |
![]() |
WaltR | Word | 2 | 10-11-2014 03:16 PM |
Word VBA Find Table Text Shading Colour and replace with another | QA_Compliance_Advisor | Word VBA | 10 | 09-19-2014 08:36 AM |
![]() |
bennymc | Word VBA | 1 | 01-27-2014 04:23 PM |