View Single Post
 
Old 04-30-2016, 08:42 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

An empty paragraph is still a paragraph, so if it doesn't have asterisks it will be reported. If you want to omit empty paragraphs then replace the loop with
Code:
For Each oPara In oSource.Paragraphs
            If Len(oPara.Range) > 1 Then
                Set oRng = oPara.Range
                oRng.End = oRng.End - 1
                If Not oRng.Characters.First = "*" Or Not oRng.Characters.Last = "*" Then
                    With oTbl
                        .Rows.Add
                        .Rows.Last.Range.Cells(1).Range.Text = oPara.Range.Text
                        .Rows.Last.Range.Cells(2).Range.Text = oSource.Name
                    End With
                End If
            End If
        Next oPara
There is no need to have empty paragraphs in a document. Use the space options of paragraph styles to insert the spacing between paragraphs.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote