Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 06-04-2023, 08:48 PM
Cendrinne's Avatar
Cendrinne Cendrinne is offline Need help with a script with Selection and If for Font Size < 8? Windows 10 Need help with a script with Selection and If for Font Size < 8? Office 2019
Competent Performer
Need help with a script with Selection and If for Font Size < 8?
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Default

Found someting here

Code:
Sub CommentMania()
'found here in forum :https://www.msofficeforums.com/word-vba/38890-macro-font-names-sizes.html
'done by Guessed / Andrew Lockton 2018-06-13 at 9:00 am

  Dim aRng As Range, aPara As Paragraph
  Set aRng = ActiveDocument.Range

  For Each aPara In aRng.Paragraphs
      If aPara.Range.Font.Size < 7 Then
'          aPara.Range.Font.Name <> "Arial"
          aPara.Range.Font.Size = 8.5
      End If

  Next aPara
End Sub

it doesn't highlight, but maybe we can figure it out, but at least it's shorther

Note: with the single quote, I've just deactivated the original script. I often leave them in in case I need to tweek it for testing.
but later on, I remove them. ***I've just removed most of them to not confuse anyone

C
Reply With Quote
 

Tags
code, font macro, help please



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with a script with Selection and If for Font Size &lt; 8? VBA - Word how to globally change the font and font size in footnotes thomasoj Word VBA 3 01-15-2020 06:26 AM
Need help with a script with Selection and If for Font Size &lt; 8? Merging two Word documents: 2nd document not maintaining original font type and font size Swarup Word 31 08-28-2018 06:55 PM
Word 10: need information typed to be in font of default selection instead of Template Font 1SickPuppy Word 1 05-06-2017 03:00 PM
Font size showing different (some superscripted??) but tools show its the same size? mikkygee PowerPoint 4 12-14-2015 11:21 PM
Need help with a script with Selection and If for Font Size &lt; 8? Looping Macro to Change Font, Font Size, and Give Heading 1 WH7262 Word VBA 1 08-26-2014 03:46 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft