Written by Allen Wyatt (last updated July 12, 2025)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365
Ralph has a document in which a large number of sections have to be displayed in two columns, with a line between the columns. He wonders if there is a way to automate that process.
As with most suggestions to automate things in Word, the solution involves the use of a macro. And, as with any macro, you need to understand what the macro needs to do before creating it. In Ralph's case, creating his two-column sections inevitably involves the following steps:
With the steps understood, a macro implementation is relatively straightforward. A macro would have no way of knowing where you want the two-column section to begin and end, so it makes sense that a prerequisite for the macro is that you need to select the text you want in the new section. That way the macro can place a section break at the beginning of the selected text and just after it. Here's a sample macro:
Sub Insert2ColSection() Dim selStartPara As Paragraph Dim selEndPara As Paragraph Dim rng1 As Range ' start of selected paragraphs Dim rng2 As Range ' ending of selected paragraphs Dim rng3 As Range ' newly inserted section ' Check to see if selection has been made If Selection.Type = wdSelectionIP Then MsgBox "Please select some text first.", vbExclamation Exit Sub End If ' Get the paragraphs at the start and end of the selection. ' Necessary because you want to place your section breaks between ' existing paragraphs, not within paragraphs. Set selStartPara = Selection.Paragraphs(1) Set selEndPara = Selection.Paragraphs(Selection.Paragraphs.Count) ' Insert continuous section break after the ending paragraph Set rng2 = selEndPara.Range rng2.Collapse Direction:=wdCollapseEnd rng2.InsertBreak Type:=wdSectionBreakContinuous ' Insert continuous section break before the starting paragraph Set rng1 = selStartPara.Range rng1.Collapse Direction:=wdCollapseStart rng1.InsertBreak Type:=wdSectionBreakContinuous ' Get the range between the two inserted section breaks Set rng3 = rng1.Duplicate rng3.End = rng2.End ' Apply two-column formatting with line between If rng3.Sections.Count = 1 Then With rng3.Sections(1).PageSetup.TextColumns .SetCount NumColumns:=2 .LineBetween = True End With End If End Sub
The macro first checks to ensure that a selection has been made. If not, then the macro exits. If so, then the macro determines the first paragraph in the selection (selStartPara) and the ending paragraph in the selection (selEndPara). Continuous section breaks are then inserted after the ending paragraph and before the first paragraph.
Finally, the newly inserted section is selected and the two-column formatting, with a line, is applied. Since the macro works exclusively with ranges, the original text selected by the user before running the macro is not disturbed.
If you want to adjust the macro to use a different number of columns in the selected text, just change the value assigned to NumColumns near the end of the macro.
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13234) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, 2021, 2024, and Word in Microsoft 365.
The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2019. Spend more time working and less time trying to figure it all out! Check out Word 2019 For Dummies today!
One of the basic programming structures used in VBA is the While ... Wend structure. This structure helps to make the ...
Discover MoreWant to turn off document repagination while your macro does its work? Here are two approaches you can use.
Discover MoreTypographical measurements are often expressed in points. There are several formatting settings that, when accessed ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2025-07-14 15:56:10
Paul F. Stregevsky
Michael (Micky) Avidan,
Your approach is the manual way. Alan's post is about automating those steps.
A nonmacro way to automate the steps is to create the dual-column section one time,; select it, along with the section breaks that bracket it; save it as a Building Block, and select that building block in the Building Blocks dropdown list (located in your ribbon or toolbar) when you need it. Poof! Your 2-column section is inserted, followed by a section break that will return you to single-column formatting.
2025-07-12 14:46:58
Michael (Micky) Avidan
The same can be done by using Word’s Built-in Columns (with Vertical Line)
1. Select the section you want to format (or place your cursor at the start of it).
2. Go to the Layout tab (or Page Layout, depending on your version) > Click Columns > More Columns > Choose Two columns > Check the "Line between" box > Click OK.
*** The section will now be in two columns with a dividing line (newspaper layout)
*** To apply this formatting to multiple sections, you can:
Add section breaks between each part (Layout > Breaks > Section Break: Next Page).
Now, apply the column formatting to each section individually OR if all sections follow the same pattern, select the entire document and apply
columns in one step.
Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments