What is the best way to insert source code examples into a Microsoft Word document?

前端 未结 15 1598
南笙
南笙 2020-12-22 16:05

I have to write some documents that will include source code examples. Some of the examples will be written from the IDE, and others would be written in place. My examples a

15条回答
  •  萌比男神i
    2020-12-22 16:20

    These answers look outdated and quite tedious compared to the web add-in solution; which is available for products since Office 2013.

    I'm using Easy Code Formatter, which allows you to codify the text in-place. It also gives you line-numbering options, highlighting, different styles and the styles are open sourced here: https://github.com/armhil/easy-code-formatter-styles so you could extend the styling yourself. To install - open Microsoft Word, go to Insert Tab / click "Get Add-ins" and search for "Easy Code Formatter"

提交回复
热议问题