ok two things ...

1) Put this at the top of your script:

$= SetOption("WrapAtEol", "On")

This will make the error message easier to read.

2) Which statement did you get that error on ? And just make double sure that the previous COM statement returned a clean success code.

-Shawn