Heading

This is some text inside of a div block.
This is some text inside of a div block.
This is some text inside of a div block.
min read

Insert New Paragraph

Word • Macros • Editing
Peter Ronhovde
11
min read

Create a new paragraph above or below the current paragraph.

What? Another one of these?

This is another one of those I wrote just because, but turns out, it’s one of my more used macros.

Thanks for your interest

This content is part of a paid plan.

Insert New Empty Paragraph

Huh? Isn't that what the Return key is for?

I'm talking about doing it faster.

Example of quickly adding a new paragraph below the current one

Create the empty macro

A previous post covers creating an empty macro like the one shown below. When you’re done, you’ll have something like:

Sub NewParagraphBelowCurrent()
  ' Insert a new paragraph below the current paragraph

End Sub

The single quote tells VBA the rest of the text on that line is a comment meant for human readers. We start our macro steps on the empty line.

Get current paragraph Range

We first access the current paragraph through the Selection as we've done before.

  Selection.Paragraphs.First

Then we get the corresponding Range (basically a span of document content with defined Start and End positions).

  Selection.Paragraphs.First.Range

We’ve used this before for things like deleting the first paragraph.

Ranges, like other objects in VBA, have various properties (see introductory article) as well as methods or actions they can carry out on their content.

Insert the paragraph break

Insert the paragraph break after the current paragraph using its Range.

  Selection.Paragraphs.First.Range.InsertParagraphAfter

If we try to use InsertParagraph instead, it will delete the whole current paragraph.

Move to the new paragraph

Now we want to move down to the new paragraph, so we end on the empty paragraph ready for typing.

  Selection.MoveDown

But the default move Unit is a line. As previously mentioned, this command works with a list of document Units, so we need to tell it to move by a paragraph

  Selection.MoveDown Unit:=wdParagraph

This move automatically collapses the Selection after the paragraph was inserted, and it works correctly no matter what our starting position is in the initial paragraph.

So we’re done!

New paragraph before current

We could use a variation of the above steps to create a variant for the previous paragraph, but there’s a subtle gotcha on the insertion point positioning that makes it a little more complicated than it seems at first.

It’s not too bad, but it’s still easier to just work with what we did last week when adding a new paragraph using the current sentence.

Make a couple tweaks and we’re done.

Previous new paragraph with sentence macro

In a previous macro, we created a new paragraph with the current sentence. If you didn't save it, here is a copy:

Sub NewParagraphWithSentence()
  ' Insert a new paragraph with the current sentence

  ' Jump to the start of the current sentence
  Selection.StartOf Unit:=wdSentence

  ' Delete preceding space or paragraph marker
  Selection.Delete Count:=-1
  Selection.InsertParagraph
  Selection.Collapse Direction:=wdCollapseEnd
End Sub

Tweak the macro for an empty paragraph

Change the unit on the starting move to a paragraph.

  Selection.StartOf Unit:=wdParagraph

Get rid of the delete step since there is no space to delete.

Then collapse toward the Start of the Selection instead of the End since we want the insertion point to finish on the new empty paragraph.

  Selection.Collapse

That’s it.

Any gotchas?

The only real gotcha to consider here was related to the InsertParagraph method.

We just needed to make sure no text is selected before we include that step. Otherwise, it would overwrite the selected text with the new paragraph. The StartOf move step just before it automatically collapsed the selection for us (since we didn’t specify an Extend parameter), so we’re safe.

Finish the macro

Now we just put the commands together for each version.

For a new paragraph below the current one:

Sub NewParagraphBelowCurrent()
  ' Insert a new empty paragraph below the current one
  Selection.Paragraphs.First.Range.InsertParagraphAfter
  Selection.MoveDown Unit:=wdParagraph
End Sub

I assigned this one to Command+Control+Return in Word for Mac.

For a new paragraph above the current one:

Sub NewParagraphAboveCurrent()
  ' Insert a new empty paragraph above the current one
  Selection.StartOf Unit:=wdParagraph
  Selection.InsertParagraph
  Selection.Collapse
End Sub

I assigned this macro to Control+Option+Return in Word for Mac.

Improvements

I tweaked my own versions to modify the style of the new paragraph based on the expected “next” style of the current or previous paragraph, respectively.

Change the style of new paragraph

Why worry about it?

It’s definitely not required since the new paragraph will inherit the style of the current one, but it’s handy to control the exact style since you might run the macro while in a heading paragraph. For a heading paragraph, the next style should be different than the style of the current paragraph.

Setting a style

We can set the style of the new paragraph using:

  Selection.Paragraphs.First.Style = “Style Name”

Since we have an insertion point, it’s easier to just set the style using the shorthand property.

  Selection.Style = “Style Name”

What style?

I would like the macro to respect the Next Paragraph Style property set in the style pane.

  Selection.Style.NextParagraphStyle

Save a step everywhere we can, and it doesn’t take much work to implement.

Storing and setting the expected style

For the version creating a new paragraph below the current, the next paragraph style is stored in the NextParagraphStyle property of the current paragraph style.

The easiest way is to just store the style before we create the new paragraph.

  NewParagraphStyle = Selection.Style.NextParagraphStyle

Then finally make the style adjustment when we’re on the new paragraph.

  Selection.Style = NewParagraphStyle

What about the before new paragraph version?

When inserting a new paragraph before the current one, I like to use the previous paragraph’s next paragraph style.

Say that three times real fast.

Here’s what I mean.

  NewParagraphStyle = Selection.Previous(Unit:=wdParagraph).Style.NextParagraphStyle

The Previous method for the Selection takes a Unit like several of the other commands we’ve used. We could use any of the Word units, but obviously we need the paragraph here.

We have to include the Unit in parentheses because we need to access the Style property after we have the previous paragraph.

Restated, I’m accessing the next style of the previous paragraph since that’s the position of the new paragraph I’m creating. If that’s confusing, just set the current style as you wish.

  Selection.Style = NewParagraphStyle

Finish the macros

Now we just put the commands together for each version.

For a new paragraph below the current one:

Sub NewParagraphAboveCurrent()
  ' Insert a new empty paragraph below the current one

  ' Store the style of the next paragraph
  NewParagraphStyle = Selection.Style.NextParagraphStyle

  ' Add the new paragraph
  Selection.Paragraphs.First.Range.InsertParagraphAfter
  Selection.MoveDown Unit:=wdParagraph

  ' Finally set the style of the new paragraph
  Selection.Style = NewParagraphStyle
End Sub

I assigned this macro to Command+Control+Return in Word for Mac.

For a new paragraph above the current one:

Sub NewParagraphAboveCurrent()
  ' Insert a new empty paragraph above the current one

  ' Store the style of the next paragraph
  NewParagraphStyle = Selection.Previous(Unit:=wdParagraph).Style.NextParagraphStyle

  ' Add the new paragraph
  Selection.StartOf Unit:=wdParagraph
  Selection.InsertParagraph
  Selection.Collapse

  ' Finally set the style of the new paragraph
  Selection.Style = NewParagraphStyle
End Sub

I assigned this macro to Control+Option+Return in Word for Mac.

I further created another variation to add a new paragraph at the end of the current heading (which I use to quickly append novel notes as I’m developing ideas), but that will have to be another newsletter.

Affiliate Links

If you're interested in using Word or another tool related to the article, check out these affiliate links. I may make a small commission if you purchase when using them, but there is no increase in cost for you, and it helps to support this site and associated content.

I've been using Microsoft for Business for commercial use (that's us writers) on one of the lower pricing tiers for years. I get to use my macros, have online storage, and don't have to worry about software updates.