我使用notepad++来编写代码。
如何复制notepad++中的代码及其格式粘贴到Microsoft Word中?(即语法突出显示等)
我使用notepad++来编写代码。
如何复制notepad++中的代码及其格式粘贴到Microsoft Word中?(即语法突出显示等)
当前回答
I practised almost all methods sent by other users in this thread but in my opinion my solution works perfect. I pasted even content from Notepad++ but supports only one font. I decided to use native programs desired to make apps. I set in every code editor (Visual Studio, Intellij Idea, Android Studio, etc) my fav font so I copy source code from my environment program and paste code formatting to my documentation together (with font also). Looks great and clear The first image shows the view in Android Studio.
第二张图片显示了粘贴的源代码。我只是复制了源代码的选定部分,并粘贴到我的文档编辑器。
其他回答
值得一提的是,64位notepad++不支持插件管理器和NPPExport,所以它们不会显示在插件菜单中。如果你尝试手动添加NPPExport插件,很可能你会看到:
64位notepad++不支持NPPExport插件
幸运的是,有NPP_Export插件可以从这里下载,它可以很好地与64位notepad++(在我的情况下是v7.2.2)和插件管理器的支持正在进行中(查看GitHub的更新)。
选择文本。
右键单击。
插件命令->复制文本与语法突出显示
把它粘贴到Word或者别的什么。
这是一个图像从notepad++当你选择文本复制为html。
以及格式化后的文本在OneNote中粘贴后的样子(类似于任何其他支持“粘贴特殊”的应用程序):
因为选择的答案是相当旧的,事情改变了,这里是新的过程,如果你使用64位notepad++。64位版本不附带插件管理器或NppExport。这里提供了所有细节。
为了快速恢复,插件管理器不再开发,NppExport可以在这里找到。
I practised almost all methods sent by other users in this thread but in my opinion my solution works perfect. I pasted even content from Notepad++ but supports only one font. I decided to use native programs desired to make apps. I set in every code editor (Visual Studio, Intellij Idea, Android Studio, etc) my fav font so I copy source code from my environment program and paste code formatting to my documentation together (with font also). Looks great and clear The first image shows the view in Android Studio.
第二张图片显示了粘贴的源代码。我只是复制了源代码的选定部分,并粘贴到我的文档编辑器。