3

I'm following the instructions from this answer:

Copy Notepad++ text with formatting?

The idea is to use the NppExport plug in to keep syntax formatting when you copy/paste from Notepad++ (there are different ways to do it - great answers over there).

Everything works as expected when pasting code into, say, Word 2016. But when pasting into OneNote 2016 it appears to trim CR/LFs. It works if I first paste into Word, then copy/paste from Word to OneNote.

1 picture == 1k words:

enter image description here

Why doesn't it work with OneNote and what can I do about it?

Community
  • 1
  • 1
biscuit314
  • 2,384
  • 2
  • 21
  • 29
  • No idea how to solve you problem. But if you only want to highlight code in onenote. Maybe you can try this plugin http://notehighlight2013.codeplex.com/releases/view/615734 – Cong Ma Apr 07 '17 at 17:57
  • @CongMa - this is what I was using before upgrading to OneNote 2016. It stopped working after the upgrade. – biscuit314 Apr 10 '17 at 03:45
  • em, I'm using OneNote 2016 too. It's sad that it cannot highlight SQL on my machine either. I only used js, c# and c++ before and they worked fine. – Cong Ma Apr 10 '17 at 15:20

1 Answers1

4

I could not find any straightforward solution, but it is possible to copy formatted code to MS Word and copy from Word to OneNote.

MohsenIT
  • 304
  • 4
  • 10