How to Add Lines Before Hyphens in Word Using Find and Replace
Question details
The user needs to insert a paragraph line or space before every line that begins with a hyphen in a Word document without modifying standard hyphenated words.

- Product
- Word
- Device & OS
- not provided
- Scenario
- Formatting a text document where bullet-like lines starting with hyphens require extra vertical spacing before them to improve readability.
- Observed behavior
- The user wants to format lines starting with a hyphen and a space without accidentally modifying hyphenated words scattered throughout the document text.
Before making bulk formatting changes, review a few instances of the hyphens in your document to ensure they are consistently followed by a space. Turn on formatting marks (Ctrl+*) so you can clearly see spaces and paragraph breaks.
Use Find and Replace to Add Paragraph Spacing
This method safely applies space before lines starting with a hyphen and a space without modifying inline hyphenated words.
Instead of writing a complex VBA macro, Word's built-in Find and Replace feature can handle this efficiently. By finding the exact character sequence and applying formatting to the search result, you can instantly adjust the document layout.
Press Ctrl+H on your keyboard to open the Find and Replace dialog box.
In the 'Find what' field, type a hyphen followed by a single space ('- ').
In the 'Replace with' field, type '^&', which tells Word to preserve the exact text it originally found.
Click 'More' to expand the options, ensure your cursor is in the 'Replace with' field, click 'Format' at the bottom, and select 'Paragraph'.
Under the 'Spacing' section, set the 'Before' value to 12 pt (or your desired line spacing) and click 'OK'.
Click 'Replace All' to apply the formatting to all matching hyphens throughout the document.

Seek Macro Assistance for Complex Automation
For highly complex automation needs where standard Find and Replace isn't sufficient, consulting specialized VBA experts is recommended.
Easily Format and Replace Text with WPS Writer
WPS Office Writer provides a highly intuitive Find and Replace tool, allowing you to seamlessly manage complex formatting tasks and apply bulk spacing for free.
- 1. Open document: Launch WPS Writer and open your target document.
- 2. Launch Find and Replace: Press Ctrl+H to open the Find and Replace dialog.
- 3. Input search codes: Enter a hyphen and a space ('- ') in 'Find what' and '^&' in 'Replace with'.
- 4. Adjust spacing format: Click 'Format', choose 'Paragraph', and adjust the 'Spacing Before' to your preferred size (e.g., 12pt).
- 5. Execute replacement: Click 'Replace All' to instantly update the formatting across your entire document.

Frequently Asked Questions
Why did Find and Replace affect my hyphenated words?
If you only search for a hyphen ('-') without a trailing space, the program will find every hyphen in the document, including those inside words. Always include a space after the hyphen in your search query to target only list items or specific starting lines.
What does the ^& symbol do in Word's Find and Replace?
The '^&' code represents 'Find What Text'. When placed in the 'Replace with' box, it tells the program to keep the exact text it found while allowing you to apply new styles or formatting to it.
Can I use a macro to add lines before hyphens instead?
Yes, a VBA macro can be written to loop through paragraphs and check the starting characters. However, using the built-in Find and Replace with formatting is significantly faster and doesn't require any programming knowledge.
How do I remove the paragraph spacing if I make a mistake?
You can simply press Ctrl+Z immediately to undo the Replace All action. Alternatively, select the affected text, open the Paragraph formatting dialog, and change the 'Spacing Before' value back to 0 pt.




