View Single Post
 
Old 04-24-2020, 09:36 AM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

It is really impossible to "try" what you posted because what you posted doesn't compile.


Code:
Sub TestFonts()
Dim bUniformFont As Boolean
  bUniformFont = True
  With ActiveDocument.Range
    If .Font.Name = "" Then
      .InsertBefore "Check Font Name" & vbCr
      bUniformFont = False
    End If
    If .Font.Size = 9999999 Then
      .InsertBefore "Check Font Size" & vbCr
      bUniformFont = False
    End If
  End With
  If bUniformFont Then MsgBox "The font used in your document is uniform. E.g., same font name, same fault size throughout."
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote