View Single Post
 
Old 10-07-2015, 04:33 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Which do you want to compare? If you just want to compare Styles, you could use:
If .Range.Style = .Previous.Range.Style Then
If you want to test that paragraphs in a particular Style are preceded by one in another defined Style, you could use code like:
If (.Range.Style = "Style2") And (.Previous.Range.Style = "Style1") Then
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote