I've had a look around at some other threads. In essence, this is my setup:

Microsoft Access 2010, Excel 2010, Outlook 2010.

On Access close:
Export query to: C:\file.xls
Open excel object and import module
call module
close excel
kill file.xls

Basically, when the database closes I want it to automatically do some stuff I'm fine with all this, works well. The issue comes here:

Included in running the macro on the xls file is to generate and send an email. Easily done, just tick the appropriate reference for microsoft outlook 14.0 object library. Works a treat.

This issue is that the minute I close excel and try to run the macro, this reference is unticked. No idea why it doesnt save. I've tried some code to load this reference but it hasnt worked.

Any suggestions welcome.

Thanks