replace

MS Word: replace spaces to non-breaking

Thursday, January 10th, 2008

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

Keep on coding