Problems with Excel 2004 and Filemaker

I have this script that runs in the script editor fine.

tell application "Microsoft Excel"
	activate
	select column 2
	set number format of selection to "mm/dd/yyyy"
	select column 11
	set number format of selection to "mm/dd/yyyy"
	select column 12
	set number format of selection to "mm/dd/yyyy"
	select column 13
	set number format of selection to "mm/dd/yyyy"
	close active window saving yes
end tell

but when I paste it into a filemaker “do applescript” script, it retuns the error “Expected end of line, etc but found class name error2741” and highlights the word “window”.

Anybody know why this is happening? I am trying to get it to quit excel with no dialog window appearing and saving with replacing the existing file. I’m having a hard time with that too.

Try changing the last line to the following


close active workbook saving yes

no, that does not work either… The same error happens and the word “workbook” is highlighted. I wonder if this is a Filemaker problem? I have no clue on how to troubleshoot this because the script works in the editor.