![]() |
|
#1
|
||||
|
||||
![]()
You cannot select non-contiguous items with VBA. You can select them sequentially, but then there would have to be some point in doing so. What do you want to do with them once found?
E.g. The following will highlight the texts so formatted: Code:
Sub Macro1() With Selection.Find .ClearFormatting With .Font .Name = "Times New Roman" .Size = 12 .Bold = True End With .Replacement.ClearFormatting Options.DefaultHighlightColorIndex = wdYellow .Replacement.Highlight = True .Text = "" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Execute Replace:=wdReplaceAll End With End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#2
|
|||
|
|||
![]() Quote:
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Swarup | Word | 31 | 08-28-2018 06:55 PM |
Macro that swaps out font type | namedujour | Word | 3 | 08-01-2018 01:27 PM |
Font Type changes with change in language | animex | Word | 1 | 09-08-2017 05:23 PM |
![]() |
d4okeefe | Word | 3 | 02-09-2016 01:16 AM |
Mysterious Font Type Symbol | curiousUser | Word | 2 | 08-18-2014 05:10 AM |