D'oh! Answer occurred to me after posting this thread. I have 30 rules. Each rule should call a script named LogRuleNN (where NN=01, 02, .., 30). Each of those calls the main script MainLogRule and passes (byval) the rule ID, and (byvar) the mail item. Only question now is whether the code...