![]() |
#1
|
|||
|
|||
![]()
When I look at font names they sometimes have a prefix or suffix such as “Cambria (Heading)”, “(Body) Calibri” or “(Default) Times New Roman”.
I want to search for text with specific fonts in VBA but while I can search for the font name such as Calibri but it will not find text with the font “(Body) Calibri”, nor can I find it by setting sFontName = "(Body) Calibri". How can I find these fonts My code is: sFontName = "Calibri" With Selection.Find .ClearFormatting .Replacement.ClearFormatting .Replacement.Text = "" .Format = True .Text = "" .Font.Name = sFontName .Execute End With |
Tags |
vba find and replace |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
SamDsouza | Word VBA | 10 | 02-28-2021 07:24 PM |
![]() |
SamDsouza | Word VBA | 4 | 01-06-2021 07:27 AM |
Macro for Font Names and Sizes | apollox | Word VBA | 8 | 06-13-2018 06:00 AM |
Formula for searching names in one go | SilverChat | Excel | 2 | 05-07-2018 06:11 PM |
How to enter names in Resource Pool/names | pstein | Project | 1 | 03-26-2012 07:37 AM |