I'm trying to check a presentation for the fonts that exist in it. This can be done with ActivePresentation.Fonts
. I also want to check if the font is normal, bold and/or italic. Bold and Italic are easy, but Normal is not. For example, say I have two text boxes, one of them has "Hello World" in Arial Italic and another the same in Arial Bold. The following code tells me I have both of these:
Sub CheckFonts()
Dim p As Presentation: Set p = ActivePresentation
Dim f As Font: Set f = p.Fonts(1)
Dim italic As Boolean: italic = f.italic
Dim bold As Boolean: bold = f.bold
Debug.Print "Bold in use: " & bold; vbTab & "Italic in use: " & italic
End Sub
Now let's assume I have one of the textboxes without Italic, but instead it is just normal Arial font. Without looping through every single font object in all shapes, is there anyway I can tell that it is a normal font (i.e. no formatting of italic/bold applied) from Presentation.Fonts
?
Thx in advance.