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
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