I'm trying to apply a style to the next paragraph after changing the preceding one, but I get an error. Can someone help? Thanks!
Code:
Dim oPar As Paragraph
For Each oPar In ActiveDocument.Paragraphs
If oPar.Range.ParagraphFormat.Alignment = wdAlignParagraphRight Then
oPar.Range.Style = "MyStyle1"
' oPar.Next.Style = "MyStyle2" '---> I get an error
End If
Next oPar