一、打开如下网址: http://www.planetb.ca/syntax-highlight-word 二、复制自己的代码 三、点击 Show Highlighted 四、全选,复制粘贴到word中