我使用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.
第二张图片显示了粘贴的源代码。我只是复制了源代码的选定部分,并粘贴到我的文档编辑器。
其他回答
对于那些没有看到插件->NPPExport,
从这里下载插件管理器。解压内容并放置在C/ProgramFile/ n++ installation, plut&updater文件夹。重启NP + +。你应该能够看到插件->插件管理器然后。 你可以下载任何插件,包括NPPExport并安装它来查看Copy命令。
从这里开始:
You can use Notepad++ to accomplish this in three ways. Just so you know, Notepad++ is a more advanced version of Notepad, which supports syntax highlighting of different code files "out of the box" - PHP included! Download & install it, fire it up, and load up your PHP file. You should automatically see it beautifully coloured (if not, because the file extension is something other than .php, go to Language -> PHP or Language -> P -> PHP). If you need to change any of the colours, you can easily do so - just go to Settings -> Styler Configurator. From that menu, you can change the various highlighting and font options, to suit your needs - although the default usually suffices for most. Then, go to Plugins -> NppExport. From there, you have three options you can consider: Export to RTF Export to HTML Copy all formats to clipboard Start with the last one - "Copy all formats to clipboard" - which will copy the entire file with the highlighted syntax to the clipboard. Once you click it, then open Microsoft Word, and just hit paste! You should see the beautifully syntax-highlighted code. If something goes wrong, then you can try one of the other options (export to RTF/HTML), although I've never had a problem with the clipboard method.
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.
第二张图片显示了粘贴的源代码。我只是复制了源代码的选定部分,并粘贴到我的文档编辑器。
选择文本
从菜单中选择“插件> NPPExport >复制RTF到剪贴板”
在Word编辑>粘贴特殊
这将打开粘贴特殊对话框。选择粘贴单选按钮,从列表中选择格式化文本(RTF)
您应该能够看到格式化文本。
这种失败很可怕:
复制.dll到这里:
\Program Files\ notepad++ \plugins——>放在这里
重新启动notepad++
现在你可以使用复制命令了!!