if You would like to do things like that (create code) in the future try to record a macro (menu path: Tools/Macro/Record New Macro), and do steps you want.
i recorded the task you ask for and get the following code:
Sub Macro1()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " ^p" 'a space and an "ENTER"
.Replacement.Text = "" 'change to
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
I've tried looking for EN spaces in special in the find box, but it only has EN dashes. I think I need to do a search for the Character code or ASCII code, but I'm not sure what the code is, or how to go about this. Can anyone help?
Still no joy, tried all of these. An En space is a space the same width as an EN dash. It can be inserted through the Insert>symbol>special characters tab, where you can also assign a keyboard shortcut. Word seems to just reconise it as a space, so when I search and replace, it strips out all the spaces, which is not what I want. I tried running the code posted by dsi but it returns the same value as a normal space, 32. Any other suggestions?
Apparently the en dash and the en space both return the same ANSI code and that is why this isn't working for you. Microsoft has confirmed this to be a bug (Refer to their Knowledge Base article: Q136396) Neil Konitzer, President
Freisoft
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.