![]() |
|
#1
|
||||
|
||||
![]()
Fixed the scripts
Test this out. Copy the below, and put the font size as the number prior to text. Then copy the script and ask to change any font size of ''8 and below'', then run the script, It should color and highlight, everything except for the size 8.5 (since you will ask to find size 8 and below). 7 Sub FNR_SI_Format_Police_sous_Grosseur_7_met_grosseur_ 8p5_avec_variable() 'Works 2023-06-05 'CommentMania, original script name 'found here in forum :https://www.msofficeforums.com/word-...mes-sizes.html 'done by Guessed / Andrew Lockton 2018-06-13 at 9:00 am // modified by me 2023-06-05 7.5 Dim aRng As Range, aPara As Paragraph Dim sVar1 As Variant 'Font Size IF below Dim sVar2 As Variant 'Font Size TO change if found Set aRng = ActiveDocument.Range 6.5 sVar1 = InputBox("Entre la grosseur de la police recherché si en bas de la grosseur désirée." _ & vbCr & "Pour des demi-points, met une virgule. Exemple : 7,5", "SUGGESTION", "7,5") 'pour les anglais, c'est point vs virgule 7.5 ENG / 7,5 FRE sVar2 = InputBox("Entre la grosseur de la police à remplacé si trouvé en bas de...." _ & vbCr & "Pour des demi-points, met une virgule. Exemple : 9 ou 8,5", "SUGGESTION", "8,5") 'pour les anglais, c'est point vs virgule 8.5 ENG / 8,5 FRE 8.5 For Each aPara In aRng.Paragraphs If aPara.Range.Font.Size <= sVar1 Then Options.DefaultHighlightColorIndex = wdYellow 8 aPara.Range.Font.Size = sVar2 aPara.Range.HighlightColorIndex = wdYellow aPara.Range.Font.ColorIndex = wdTeal End If Next aPara End Sub Let me know how it turns out for others ![]() C |
![]() |
Tags |
code, font macro, help please |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
thomasoj | Word VBA | 3 | 01-15-2020 06:26 AM |
![]() |
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 |
![]() |
WH7262 | Word VBA | 1 | 08-26-2014 03:46 PM |