Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-06-2023, 01:07 AM
RobiNew RobiNew is offline Check uniform font size in each paragraph Windows 10 Check uniform font size in each paragraph Office 2016
Competent Performer
Check uniform font size in each paragraph
 
Join Date: Sep 2023
Posts: 208
RobiNew is on a distinguished road
Default Check uniform font size in each paragraph

This simple macro checks the font size in each paragraph of the doc. But this is not what I want. I need to check if some paragraph contains a string with a different font size from the rest of the paragraph. Can someone help? Thanks!


Example: Macros are not always easy to devise.
Code:
Sub FontSize()
  Dim aRng As Range, aPara As Paragraph
  Set aRng = ActiveDocument.Range
  aRng.End = ActiveDocument.Range.End
  For Each aPara In aRng.Paragraphs
        If aPara.Range.Font.Size <> 12 Then
        aPara.Range.Select
        MsgBox "Check font size"
      End If
      aRng.Collapse wdCollapseEnd
  Next aPara
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Check uniform font size in each paragraph VBA - Word how to globally change the font and font size in footnotes thomasoj Word VBA 3 01-15-2020 06:26 AM
Check uniform font size in each paragraph Merging two Word documents: 2nd document not maintaining original font type and font size Swarup Word 31 08-28-2018 06:55 PM
Font size showing different (some superscripted??) but tools show its the same size? mikkygee PowerPoint 4 12-14-2015 11:21 PM
Check uniform font size in each paragraph Looping Macro to Change Font, Font Size, and Give Heading 1 WH7262 Word VBA 1 08-26-2014 03:46 PM
Check uniform font size in each paragraph Paragraph (carriage) return font size revrossreddick Word 2 12-28-2011 01:33 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:55 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