Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | 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 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 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
Reply With Quote
  #2 (permalink)  
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.
Reply With Quote
  #3 (permalink)  
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

Reply With Quote
  #4 (permalink)  
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?
Reply With Quote
  #5 (permalink)  
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

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
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



All times are GMT -4. The time now is 06:40 AM.


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