Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-04-2023, 07:00 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 Need help with a script with Selection and If for Font Size < 8?

I feel I'm so close but searching doesn't come up with solution

I have


Code:
Sub TESTS_If_Font_size_below_8p5_put_Font_size_8p5()
Dim Rng As Range

With ActiveDocument.Range
  With .Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = ""
    .Forward = True
    .Wrap = wdFindStop
    .Execute
  End With
   Do While .Find.found = True
      If .Font.Size < 8.5 Then

           .Find.Replacement.Font.Size = 8.5
           
      End If
    .Collapse wdCollapseEnd
    .Find.Execute
  Loop
End With
End Sub
Why it does nothing? No error message but no action

Need advice please

Unless it's not doable? I keep searching.

C
Reply With Quote
 

Tags
code, font macro, help please

Thread Tools
Display Modes


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 07:26 AM.


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