Sometimes while pasting text in Ms Word from other source like pdf, you may find unwanted paragraph break or newline character at the end of each line. Removing each of these paragraph break manually can be quite annoying. If you have ever faced such a problem, then don’t worry. The trick given below can remove all the line break in just 1 click. To achieve a task, we will need help of a Macro. Step by step guide for each of the steps involved is shown here.
Steps to create shortcut to delete all paragraph break in one click
- Enable Developer tab by
- Right clicking in the empty area of the ribbon and select “Customize the Ribbon“
- In “Customize Ribbon” tab and check the box against “Developer” in Customize the Ribbon area and click ok
- Above step should add developer tab to your Ms Word
- Right clicking in the empty area of the ribbon and select “Customize the Ribbon“
- Go to Developer tab and click “Visual Basic“.
- Above step will open Visual basic window where you can write macro to automate tasks.
- Copy the macro given in link and paste as shown below. Click save.
- Close above window.
- To assign macro to the button in quick access bar
- Right clicking in the empty area of the ribbon and select “Customize the Ribbon“
- Go to “Quick Access Toolbar” tab, select the Macro ending with DeleteNewLine and click Add
- To assign the desired Icon to Macro, click Modify, and select the desired icon from the available list and click ok.
- Click ok to close Word option window.
- Now you should see additional button (assigned to macro) in quick access tool bar as shown below
Steps to remove unwanted new line characters in 1 click
After getting the macro button in quick access tool bar, follow these steps to remove all unwanted new line character in 1 click.
- Select the text from which you want to remove all unwanted new line characters
- Click on the macro button
- All new line character / paragraph break is removed
Video Demonstration with all steps
All the above steps (i.e. creating and assigning macro to button and steps to remove all newline characters) are also shown in my following YouTube video.