Copy paste SQL between MS OneNote and SSMS

notepad++, onenote, ssms

Solution

Copy the text from SSMS to Microsoft word. Then copy the formatted text from MS Word to OneNote. Works fine.

Problem

I use OneNote to keep all usefull info for my work, including SQL queries. So I copy paste them between OneNote and Microsoft SSMS (SQL Server Management Studio) When I do so, I have often wrong characters in SSMS that I must remove manually. In the other way around (from SSMS to OneNote), the nice color SQL formatting is lost (I can put it into MS Word and then OneNote and it works but it is not very practical).

Original source