![]() |
#9
|
||||
|
||||
![]()
Assuming you only want to test font sizes and typefaces from the first heading onwards, you could use code like this
Code:
Sub CommentMania() Dim aRng As Range, aPara As Paragraph Set aRng = ActiveDocument.Range.GoTo(What:=wdGoToHeading, Which:=wdGoToFirst, Count:=1) aRng.End = ActiveDocument.Range.End For Each aPara In aRng.Paragraphs If Left(aPara.Style.NameLocal, 7) <> "Heading" Then If aPara.Range.Font.Size <> 10 Then ActiveDocument.Comments.Add aPara.Range, "Check font size" ElseIf aPara.Range.Font.Name <> "Arial" Then ActiveDocument.Comments.Add aPara.Range, "Check typeface" End If End If Next aPara End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
Tags |
macro vba word |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Same selection of font..different sizes... | Garyz | Word | 8 | 02-02-2016 09:13 AM |
Change font sizes in template | Calab | PowerPoint | 1 | 12-23-2013 09:29 AM |
Reply: huge font sizes... | Uli | Outlook | 3 | 09-19-2012 06:57 PM |
Font sizes in Outlook 2003 | peterandrew | Outlook | 3 | 09-18-2012 04:26 AM |
Changing all different font sizes by a value | Puffin617 | Word VBA | 6 | 05-21-2009 08:23 AM |