Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB Databases
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 18th, 2006, 10:43 PM
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.

TIA,

Alan

Reply With Quote
  #2 (permalink)  
Old April 4th, 2006, 08:24 AM
Registered User
 
Join Date: Apr 2006
Location: , , .
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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:20 PM.


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