Wrox Programmer Forums
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 18th, 2006, 10:43 PM
Authorized User
 
Join Date: Jun 2003
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.

TIA,

Alan

 
Old April 4th, 2006, 08:24 AM
Registered User
 
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi Alan,

maybe it's too late, but:)
Code:
DoCmd.OutputTo acReport, "repCustomers", acFormatRTF, "C:\Test.doc", True/False
True/False - it's for Word-Start: to be or not to be:)

kind regards,
Baloo.






Similar Threads
Thread Thread Starter Forum Replies Last Post
sql reporting 2005 - output / rendering report JustABob Reporting Services 1 April 4th, 2006 01:15 PM
adding word wrap to test output to a report hbenditsky Visual Basic 2005 Basics 0 February 5th, 2006 06:46 PM
matrix report output saravananedu Oracle 1 March 3rd, 2005 10:20 AM
report output to a pcl file hsmc Access VBA 1 September 8th, 2003 11:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.