![]() |
|
#2
|
||||
|
||||
|
I assume you only want to find the first instance?
Code:
Sub ShowPARA()
Dim p As Paragraph, pp As String
Dim pp2 As String
For Each p In ActiveDocument.Paragraphs
pp = p.Range.Text
If Not p.Range.End = ActiveDocument.Range.End Then
pp2 = p.Range.Next.Paragraphs(1).Range.Text
Else: pp2 = ""
End If
If Val(pp) > 279 Then
Debug.Print pp & pp2 & vbCr
Exit For 'stop processing the loop
End If
Next p
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
compare each paragraph with the preceding paragraph
|
cyraxote | Word VBA | 6 | 10-09-2015 08:03 AM |
| Replacing paragraph formatting before column break also changes the next paragraph after the break | jjmartin1340 | Word | 3 | 09-21-2015 10:50 PM |
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 |