Thread: [Solved] Get next paragraph
View Single Post
 
Old 09-05-2016, 05:58 PM
kirkm kirkm is offline Windows XP Office 2003
Advanced Beginner
 
Join Date: Aug 2013
Posts: 40
kirkm is on a distinguished road
Default Get next paragraph

Hi, I've never used VBA in Word but via Google fugured this..

Code:
Sub ShowPARA()
Dim p As Paragraph, pp As String
For Each p In ActiveDocument.Paragraphs
    pp = p.Range.Text
    If Val(pp) > 279 Then
        Debug.Print pp
        Stop
    End If
Next
End Sub
I want to show the next paragraph as well as pp.
This is to let me check the contents for any mistakes.
Reply With Quote