I downloaded an outline from the web but get these spaces before and after the number reference. I turn on the paragraph marks and the space is not a space. I tried to find and replace a non-breaking space and it's not that either. I can manually delete the two spaces, but how can I do this with VBA?
1. Introduction ( 1:1–9 )
With the about example, there is a space before the 1 and a space after the 9
Remove space in outline
-
- Administrator
- Posts: 78545
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Remove space in outline
Try the following:
- Select an opening parenthesis and the space after it.
- Copy it (Ctrl+C)
- Press Ctrl+H to activate the Replace dialog.
- Clear the 'Find what' box, then paste (Ctrl+V)
- Clear the 'Replace with' box.
- Click 'Replace All'.
Repeat, this time copying a closing parenthesis and the space before it.
- Select an opening parenthesis and the space after it.
- Copy it (Ctrl+C)
- Press Ctrl+H to activate the Replace dialog.
- Clear the 'Find what' box, then paste (Ctrl+V)
- Clear the 'Replace with' box.
- Click 'Replace All'.
Repeat, this time copying a closing parenthesis and the space before it.
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 254
- Joined: 09 May 2020, 14:00
Re: Remove space in outline
Thanks Hans, that worked.
-
- Administrator
- Posts: 78545
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Remove space in outline
The advantage of this method is that you don't have to know what the actual character is. By copying it into the 'Find what' box, Word takes care of it for you.
Best wishes,
Hans
Hans