Cross-posted at:
http://www.excelforum.com/word-programming-vba-macros/
For cross-posting etiquette, please read:
http://www.excelguru.ca/content.php?184
It's difficult to see how your code is failing on "Sub ", "Function " and "Property " when none of those expressions appear in your 122 lines of code. Neither is there any indication that you input them from somewhere else. It would also be helpful if you said what you're actually trying to achieve. So far your code etc. basically exists in a contextless vacuum.