View Single Post
 
Old 02-01-2021, 03:07 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

To return the paragraph numbers for empty (or just spaces) paragraphs you could do a loop like this
Code:
Sub GetUsedParas()
  Dim aPar As Paragraph, sList As String, i As Long
  For i = 1 To ActiveDocument.Paragraphs.Count
    If Len(Trim(ActiveDocument.Paragraphs(i).Range.Text)) = 1 Then
      sList = sList & "," & i
    End If
  Next i
  MsgBox Mid(sList, 2), vbInformation + vbOKOnly, "Empty Paragraphs List"
End Sub
You can team this up with Paul's code to open the document.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote