Ask Your Question

Always autoreplace space before dash with non-breaking space?

asked 2016-10-26 13:46:06 +0100

int_ua gravatar image

Is there any option to make autocorrect work not only with anything between spaces? I want to always have a non-breaking space before a dash without the need to use Find and Replace on every document. Is it possible?

edit retag flag offensive close merge delete


Take care: a non-breaking space is also a fixed width space, so in justified text these spaces may be narrower than normal spaces on the same line.

floris v gravatar imagefloris v ( 2016-10-26 14:38:26 +0100 )edit

1 Answer

Sort by » oldest newest most voted

answered 2016-10-26 14:14:34 +0100

int_ua gravatar image

I've written a macro for that:

Sub nbsp_dash

Dim replace As Object

replace = ThisComponent.createReplaceDescriptor
replace.SearchString = " —"
replace.ReplaceString = " —"

End Sub
edit flag offensive delete link more


20 points required to accept or unaccept your own answer

int_ua gravatar imageint_ua ( 2016-10-26 14:15:23 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-10-26 13:46:06 +0100

Seen: 80 times

Last updated: Oct 26 '16