Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 04-30-2016, 08:42 PM
gmayor's Avatar
gmayor gmayor is offline Making a Paragraph Report - Check Paragraphs For First & Last Characters Windows 10 Making a Paragraph Report - Check Paragraphs For First & Last Characters Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,144
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automation Process of Schedule Report Output and Report Check Score Card ! ozman86 Word VBA 1 11-19-2014 11:52 PM
Making a Paragraph Report - Check Paragraphs For First & Last Characters making translated paragraphs consecutive user2969 Word 1 01-29-2014 09:00 PM
Making a Paragraph Report - Check Paragraphs For First & Last Characters Cannot select single characters. Word selects paragraphs or parts of sentences. TMinnich Word 2 10-25-2013 09:38 AM
How to combine many paragraphs in one paragraph? Jamal NUMAN Word 25 03-08-2013 04:31 AM
Making a Paragraph Report - Check Paragraphs For First & Last Characters Making sure the correct number of characters are entered. leroytrolley Excel 1 07-25-2008 06:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft