Not straight to Word, but you can use vim to output html. A quick Super Search revealed this node.
Update: or here, here, or here.
In reply to Re: Code formatting
by crouchingpenguin
in thread Code formatting
by Foggy Bottoms
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |