web analytics

MS Word: put syntax highlighed code into the document

Here is the simple method to put the code with highlighting into the Word document:

Download and install Notepad++. This is easy-to-use and yet very powerful text editor with a lot of features, support of the plugins etc. Put your code into the Notepad++ edit window

Configure the language, if Notepad++ did not do […]

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