Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 10-07-2015, 03:52 PM
macropod's Avatar
macropod macropod is offline compare each paragraph with the preceding paragraph Windows 7 64bit compare each paragraph with the preceding paragraph Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long
With ActiveDocument
  For i = 2 To .Paragraphs.Count
    With .Paragraphs(i)
      If .Range.Text = .Previous.Range.Text Then
        .Previous.Range.HighlightColorIndex = wdYellow
      End If
    End With
  Next
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing paragraph formatting before column break also changes the next paragraph after the break jjmartin1340 Word 3 09-21-2015 10:50 PM
Split a paragraph bnyamin Word VBA 13 10-05-2014 08:18 PM
compare each paragraph with the preceding paragraph Narrow Paragraph to Wide Paragraph HELP icloudy Word 1 12-09-2012 03:49 PM
spacing within paragraph psmoore Word 1 06-22-2010 02:15 AM
Paragraph cloa513 Word 1 12-29-2009 02:20 AM

Other Forums: Access Forums

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