I've tried one or two code-formatting plugins for Windows Live Writer, but this one from Doug Stockwell is the best so far. Instead of trying to syntax-highlight the code you're pasting using its own highlighter, it just pastes the RTF contents of the clipboard directly into Writer. That means that whatever colour scheme you're using in Visual Studio is preserved in your blog post. To whit:

 static class ServiceFactory  { // creates a new instance of the given web service reference,  // replacing its host name and url path with values from the  // user's settings  public static T New<T>() where T : HttpWebClientProtocol, new() { string server = Properties.Settings.Default.AppServer; string path = Properties.Settings.Default.AppPath; T service = new T(); service.Timeout = 30000; if (!string.IsNullOrEmpty(server)) { service.Url = Regex.Replace(service.Url, @"http://(?:[^/]*)/(?:[^/]*)/(.*)", @"http://" + server + "/" + path + "/$1"); } return service; } } 

Nice, huh? It even wraps it in a <pre> tag with a class of "code" so you can add some CSS styling if you like. Now all I need is some code worth posting.

Update! Oops! It looks like Community Server is playing silly-buggers with the inline style that the plugin uses to colourise the code! Damn!

Update 2! Ok, editing the post from within Community Server fixed it. Weird. I wonder if it's a metablogapi thing?