Create Numbered Lists with Blank Lines Using VB.NET in Word
Question details
The user wants to know how to use VB.NET automation to create a numbered list in a Word document that includes one or two blank lines between the list items.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Automating document creation and formatting using VB.NET without manually inserting empty lines.
- Observed behavior
- Generating a numbered list where items are cleanly separated by blank space formatting rather than empty paragraph markers.
Ensure you have a basic understanding of VB.NET programming and that the Microsoft Word Object Library reference is successfully added to your project.
Apply Paragraph Spacing and Styles via a Word Template
The most reliable method is to create a template with predefined styles for spacing, rather than manually inserting empty paragraphs via code.
Inserting empty paragraphs into a numbered list using code can break the numbering sequence or lead to inconsistent formatting. Instead, use Word's built-in paragraph formatting features like 'Space After' and 'Space Before'.
Open your word processor, create a new document, and define a new Paragraph Style. Set the 'Space After' property to 12pt (for one blank line) or 24pt (for two blank lines).
Link your newly created style to a numbered list format so that every time the style is applied, the numbering continues automatically without manual intervention.
Save this document as a Word Template (.dotx) and store it in an accessible directory for your VB.NET application to call upon.
In your VB.NET code, create a new document based on the template. Use the Selection.Style property to apply the predefined numbered list style to your text items.
Dynamically Set Paragraph Spacing in VB.NET Code
If using a template is not an option, you can directly modify the paragraph formatting properties within your VB.NET code.
Edit and Format Word Documents Easily with WPS Office
If you frequently work with formatted Word documents, WPS Office offers a free, lightweight, and highly compatible alternative. You can easily manage paragraph styles, line spacing, and numbered lists without complex coding.

Frequently Asked Questions
Why shouldn't I just insert empty paragraphs using VB.NET?
Inserting empty paragraphs using methods like InsertParagraphAfter can break the numbering sequence, cause unpredictable formatting behavior, and make the document much harder to maintain or reformat later.
How many points equal a blank line in Word documents?
Typically, a single standard blank line is equivalent to 12 points of spacing. To add two blank lines, set the SpaceAfter property to 24 points.
Can I define the spacing before the paragraph instead of after?
Yes, you can use the SpaceBefore property in your paragraph style. However, using SpaceAfter is generally preferred for lists to maintain consistent separation between sequential items.
Do these VB.NET styling methods work for bulleted lists as well?
Absolutely. The same principles of applying predefined styles and adjusting SpaceAfter or SpaceBefore work seamlessly for both bulleted and numbered lists.




