View Single Post
  #1 (permalink)  
Old January 18th, 2006, 10:43 PM
alantodd alantodd is offline
Authorized User
Join Date: Jun 2003
Location: Sydney, NSW, Australia.
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to alantodd
Default Automating report output

Hi Everyone,

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
DoCmd.RunCommand acCmdOutputToRTF

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.



Reply With Quote