Is it possible to copy code from Visual Studio and

2019-03-09 15:55发布

Is there a way to copy code from visual studio (C#) and paste it into OneNote, without losing the formatting?

I was able to do this, but only if I copy from VS, paste to Word, copy from Word, and then paste to OneNote.

11条回答
对你真心纯属浪费
2楼-- · 2019-03-09 16:36

Try this elegant solution directly from Microsoft: Productivity Power Tools 2015

https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProductivityPowerTools2015

The HTML copy-paste works nicely with OneNote.

查看更多
我欲成王,谁敢阻挡
4楼-- · 2019-03-09 16:38

There is an add-in for Microsoft Visual Studio that allows you to copy source code, syntax highlighting, and line numbers as HTML.

With this add-in, you can copy from VS and paste HTML directly to your target.

Check it out here: CopySourceAsHtml

查看更多
beautiful°
5楼-- · 2019-03-09 16:40

There is fortunately a solution for Visual Studio 2010! Install the Visual Studio 2010 Pro Power Tools extension and copy/paste to OneNote retains syntax highlighting. Made me a happy man;)

Jan Roelof

查看更多
迷人小祖宗
6楼-- · 2019-03-09 16:40

Notehighlight supports syntax highlighting for : C#, SQL, CSS, JS, HTML, XML, JAVA, PHP,Perl, Python, Ruby, C++

They have release a port has been release compatible with OneNote 2013 (Also happens to work with OneNote2016)

查看更多
Root(大扎)
7楼-- · 2019-03-09 16:45

NoteHighlight will do the trick. I found it through the following blog post, codefoster.

查看更多
登录 后发表回答