Thanks. I suppose I should have thought of that. The weird thing is that it has stopped happening with the original code, for reasons unknown :-/
UPDATE: Well I spoke too soon. It is happening again, which is weird in itself, and suggests the cause is not an empty field. I don't understand the message about parameters, because the function call has the same number of parameters when I get the error and when I don't.
Also eval does not trap the error -- it does so for the perl statement, but OLE still throws the error.