The agents don't run simultaneously. Each produces a separate report when the user clicks the appropriate menu item in the application's toolbar. They do however use the same variable names for the instance of Word and the table object in the document. As I mentioned in an earlier post, neither of these is set to Nothing at the end of the code, so I began to wonder if instances of Word and the table were being left active and then accessed again next time one of the agents runs. However, this does not explain why it works a lot of the time...especially when you consider that all 3 agents refer to tables with columns of identical widths.

It then occurred to me that the basis of this code was taken from a similar agent on a different database altogether - which again used the same variable names but different table layouts and column widths. Maybe this other agent was being run at some point and setting up different sized tables which somehow interfered with the ones in question. However, this original code runs on another server entirely so I would guess it shouldn't interfere. Also, I deliberately triggered this initial code and tried the newer one straight afterwards and again it worked fine.

The agents start Word when they need it - it's not running in the background beforehand.

The problem was happening on Friday afternoon and it was still happening on Monday morning despite my laptop being switched off all weekend, so restarting Notes, Word or Windows didn't directly help. Having said that, the problem might well have come and gone a couple of times over the weekend if anyone had been around to test it.

I'm stumped.