Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
| Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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 August 3rd, 2005, 09:12 AM
Friend of Wrox
Points: 912, Level: 11
Points: 912, Level: 11 Points: 912, Level: 11 Points: 912, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: Dublin, , Ireland.
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default Automatically Saving sending an e-mail

Help Again
Is there some way of adding the DoCmd.RunCommand acCmdSaveRecord to the line of code below.

DoCmd.SendObject acSendReport, "RPTSUR1", acFormatRTF, "", "Brendan.Bartley@eircom.net", "", " System Unit Replacement " & Office, "System Unit Replacement logged by " & Logged_By, True
I need that when the code is executed it also saves the file being sent.

__________________
Brendan Bartley
 
Old August 3rd, 2005, 09:17 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Salisbury, Wiltshire, United Kingdom.
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to leehambly
Default

What is the file (being sent) that you want to save? Excel, csv, word, etc... a few different methods, transfertext/spreadsheet is probably your best bet... lemme know the file format and I should be able to help more.
 
Old August 3rd, 2005, 09:34 AM
Friend of Wrox
Points: 912, Level: 11
Points: 912, Level: 11 Points: 912, Level: 11 Points: 912, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: Dublin, , Ireland.
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The File being sent is a report from an access database

 
Old August 3rd, 2005, 11:08 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: Salisbury, Wiltshire, United Kingdom.
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to leehambly
Default

Doh... should have noticed that in your sendobject... anyhoo... try...

DoCmd.OutputTo acReport, "RPTSUR1", "SnapshotFormat(*.snp)", "", False, ""

The first "" is the file location of where you want to save it. Left blank, like this, will prompt for a file location.
The "False" is for autostart.
The second "" is for a template file.

This will save the report as a report snapshot, which you can view using the snapshot viewer, Access 2000 onwards, I think. You could use Rich Text, but dependant on how much formatting you have on the report this will generally screw up at some point, if you want to preserve the look of the report then snapshot (or pdf's but thats a whole 'nother story) is the way to go.
If snapshots are not possible and formatting is not an issue, how about just dumping the relevant data out to a text file?
 
Old August 4th, 2005, 05:28 AM
Friend of Wrox
Points: 912, Level: 11
Points: 912, Level: 11 Points: 912, Level: 11 Points: 912, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2005
Location: Dublin, , Ireland.
Posts: 181
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the Help





Similar Threads
Thread Thread Starter Forum Replies Last Post
send mail automatically surendran PHP How-To 1 September 21st, 2007 06:34 AM
problems sending mail with java mail gandacuboy J2EE 2 December 20th, 2006 03:05 PM
Mail documents automatically John Dempsey Excel VBA 1 September 17th, 2005 04:28 PM
ASP: automatically sending email report luxx Classic ASP Databases 1 January 12th, 2004 04:50 AM
Sending both text mail and HTML mail - CDONTS madhukp Classic ASP Basics 1 October 8th, 2003 01:05 AM





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