When studying, I note down a lot of what I learn in a word document. This contains code snippets, which word often underlines as spelling mistakes as it doesn't understand them. I manually highlight each occurrence and apply a style called "Inline code", which has a different font, and spell checking disabled, to make it stand out as "code".
To speed things up, I would like to be able to highlight a section of text, and have word automatically apply this style called to all spelling mistakes. Furthermore, I would like this to be extended so that if I have, say, the following:
callFunction(int a, int b);
...then the style is applied to everything up to the terminating semi colon, not just the callFunction part. I think the logic for this would be
for each spelling mistake:
if there is not a space after the last character of the misspelled word
continue applying the style to each character until we hit a semi colon
Could anyone possibly advise on this?
I am using Word 2007 and 2010. Note I think macros are written in VBS, but I really am not sure on that. Hence the 500 points :)