Automating report output
I have a report in my MS Access application that I would like to attach to an e'mail and send to others.
To do this manually, I preview the report, right click and select Export. Then save as an RTF file and attach to an e'mail. I need to automate this so it occurs with a single button click.
In effect the module will need to export the report to an RTF file, then call the routine that sends the e'mail. The problem I am having is that I am trying to use the following commands to output the report:
DoCmd.SelectObject ReportName, True
When I run this, it does two things taht I don't want it to do.
Firstly it displays the Database Window which I want to keep hidden from the users
Secondly, Once it has created the .rtf file, it automatically launches MS Word and displays the results.
I need to find out how to stop the Database window opening and how to stop MS Word from launching.
Any help or hints would be most appreciated.