![]() |
#1
|
|||
|
|||
![]()
I am very new to macros and I am learning and rookie at vba. I am trying to write a macro which will detect if the document has uniform font size and using same font except for Title page and headings. If any sentence has a different size or different font name then a comment should be added automatically saying check font size or name. For example.
This is an example to test the font sizes macro If something like this appears then a comment should be automatically added saying check the font name or size. I dont know how to embed about font name so far it only checks font size. Code:
Sub CheckFonts() Dim objSingleWord As Range Dim objDoc As Document Dim mycomment As Object Set objDoc = ActiveDocument With objDoc For Each objSingleWord In .Words If objSingleWord.Font.Size > 10 Then objSingleWord.Font.Size = 10 mycomment.AddComment "here a comment" .Comment.Visible = False End If Next End With End Sub Any help is much appreciated. Thank you in advance |
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 |