Virtual memory errors usually occur when too many applications are open.
Your macro should probably execute reports in succession and not all at the same time.
If that does not help, increase RAM on the cognos server.
Given the info you provided, these are the only two answers that come to mind.
Dima.