I have an application that saves report output to a file so that the file can later be attached to automated emails. In the past, I have used the "OutputTo" command to export the report as a snapshot, works great most of the time. The problem that has arised is that one particular report needs to load a control table in order to turn subreports off and on, but it seems that if you use the "OutputTo" command to print the report, it doesn't cause the code in the code module to execute. I am thinking the solution is to output the report to a file as part of the report.close event. How does one do this? And is there anyway to get OutputTo to execute the code?