MS Word: replace spaces to non-breaking

To insert it manually, use Ctrl+Shift+Space

Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Style = ActiveDocument.Styles("Normal")
Selection.Find.Replacement.ClearFormatting
With Selection.Find
   .Text = "   "
   .Replacement.Text = "^s"
   .Forward = True
   .Wrap = wdFindContinue
   .Format = True
End With
Selection.Find.Execute Replace:=wdReplaceAll

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>