VBA Word Macro for Adding a Blank Line after Each Verse in a List

February 4, 2024 — Leave a comment

Suppose you have used some kind of Bible software to export the text of a list of verses to a Word document. For some reason, the verses end up without a blank line in between them, and you would like to have a blank line in between all the verses.

The following macro adds a blank line after each verse in the Word document.

Sub BlankLineInsert()

‘Selects the whole document

‘Provides the total number of paragraphs
pp = Selection.Paragraphs.Count

‘Loops through the paragraphs and adds a line after each verse except the last verse

For i = 1 To pp * 2 – 2

‘Selects each paragraph

‘Goes to the end of that paragraph
Selection.MoveRight Unit:=wdCharacter, Count:=1

‘Adds a blank line

‘Increases the value of i by 1 to account for the extra line that has been added
i = i + 1

Next i

End Sub

Note: This macro also works for any other Word document that is only text for which you want to add a blank line after each paragraph in the document.


Copyright © 2011-2024 by Rajesh Gandhi. All rights reserved.



Copyright © 2011-2024 by Rajesh Gandhi. All rights reserved.

No Comments

Be the first to start the conversation.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 


This site uses Akismet to reduce spam. Learn how your comment data is processed.