OneNote2007: How can I highlight the programming code I typed in??

J

Jim Wang

I want to use OneNote2007 to manage my programming code.

Not sure if OneNote2007 supports hightlight for C#/JavaScript/HTML and
comments?

I want it is as same as Visual Studio.

Thank you!
Jim
 
J

John Guin

No, ON 2007 does not support syntax highlighting for code (even code that is
pasted into it).

This has bubbled up a couple of times recently. I'll keep my eye for this
as well.

Anecdote: we used a shared notebook for code reviews for a few weeks
earlier this year. It wnet OK - maybe a C on a grade scale. Syntax
highlighting being lost was a sore point. But having multiple reviewers make
comments alongside the code was nice.
 
J

Josh Einstein

Not a great workaround, I know. But you can do it in two steps by pasting it
into Word first, then copy/paste that into OneNote. The color coding will be
retained.
 
J

Jim Wang

Thanks John, Josh,

Do you know if Word2007 support syntax highlighting for code? (not pasting
from VS)

Cheers,
Jim
 
J

Josh Einstein

No, that's an IDE feature, not a word processor feature. The only reason it
works pasting from VS is because VS puts HTML content on the clipboard.
 
J

John Guin

I looked around for a third party addin for Word to perform syntax
highlighting and found one: ADX. A url for it is
http://www.vicman.net/lib/syntax-highlighting.htm

I did not try it, though.

Here's an incredibly interesting article describing a method to create some
simple code to do the highlighting for you:
http://blogs.microsoft.co.il/blogs/tamir/archive/2006/12/14/RichTextBox-syntax-highlighting.aspx

I was thinking about that and figure you could use autocorrect to do this,
or even write a simple macro to change to color of keywords.

Hope some of this helps!
 
R

recursive

Thanks to Josh for the workaround...

I definitely would put this on the wish list since this was preventing me
from creating programming documentation in OneNote since it really bothered
me to not get the syntax coloring. Now I can move forward using Word as an
intermediary.

 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top