Further questionsAre you using Excel vba?Word uses ActiveDocument. Excel uses Active workbook or Active sheet.Try clicking Debug/Compile and see if your code is basically valid.