在Microsoft Office Word 或者WPS中插入代码实现色彩高亮和保持原有格式

1.准备软件NotePad++,官网地址为http://notepad-plus-plus.org/zh/

2.打开软件在语言选择项中先确定好自己要粘贴的是哪种语言的代码。

3.之后将代码粘贴进来,排好版后,并依次选择“插件->NppExport->Copy all formats to clipbord”。

4.进入你要编辑的word文档中,直接粘贴就可将刚才的代码原样拷贝到文档中。

 

转:http://blog.csdn.net/zx19899891/article/details/7393846

原文地址:https://www.cnblogs.com/andgoo/p/2568517.html