Delete a Blank Paragraph After a Word Bookmark with VBA
Question details
Delete an address line stored in a Word bookmark without leaving an empty paragraph.

- Product
- Microsoft Word VBA
- Device & OS
- not provided
- Scenario
- A macro removes the contents of an address bookmark, and the user wants the next address line to move up.
- Observed behavior
- An empty paragraph remains after the bookmarked text is deleted.
Confirm that the bookmark is named bmAddress2 and covers the paragraph mark as well as the address text. In Word, select Home > Show/Hide ¶ to make paragraph marks visible.
Delete the bookmark range, including the paragraph mark
Use the bookmark's Range property to remove its contents and paragraph mark together.
The paragraph mark must be inside the bookmark range; deleting a range that contains only the address text will leave the empty paragraph behind.
In Word, turn on Home > Show/Hide ¶. Open Insert > Bookmark, select bmAddress2, and choose Go To to inspect its range. If the paragraph mark is outside the selection, select the complete address paragraph including ¶, then use Insert > Bookmark to redefine bmAddress2.
Open Developer > Visual Basic, find the procedure that removes the address line, and use this statement: ActiveDocument.Bookmarks("bmAddress2").Range.Delete
Run the macro from Developer > Macros, then check the address block in the document. The next line should move up if the deleted range included the paragraph mark.

Edit Address Lines in WPS Writer
WPS Office is a free, lightweight alternative for editing Word documents. Its familiar interface and Microsoft Word format compatibility make it easy to move documents over and adjust address lines manually. It does not fix a Microsoft Word VBA macro.

Frequently Asked Questions
Why does a blank line remain after I delete the bookmark text?
The bookmark range may contain the text but not the paragraph mark. Turn on Home > Show/Hide ¶ and check the bookmark selection through Insert > Bookmark.
What is the difference between deleting a bookmark and deleting its range?
Bookmarks("bmAddress2").Delete removes the bookmark marker but leaves its text. Bookmarks("bmAddress2").Range.Delete removes the content in the range as well.
How can I prevent an error if the bookmark no longer exists?
Use ActiveDocument.Bookmarks.Exists("bmAddress2") to check for the bookmark before calling its Range.Delete method.
Will deleting the bookmark range always remove the paragraph?
No. The range must include the paragraph mark, and Word's final paragraph mark cannot be deleted. Check the selection with formatting marks visible before running the macro.




