Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA 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 September 19th, 2003, 11:48 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Default Email Sending Reports

I am using the DoCmd.SendObject method to automatically send a report by e-mail.

The listed intrinsic output formats are DAP, HTML, RTF, TXT or XLS. Is there a way to send the report as a Snapshot (.SNP) instead? If so, what constant should I use for the output format parameter?

This report is in Access 2000. Is this capability DoCmd.SendObject / Report / Snapshot available in Access 2002 or Access 2003 if it doesn't work with Access 2000?

Rand
__________________
Rand
 
Old September 19th, 2003, 12:24 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is what I use and then call the function:

Function SendSnap()
On Error GoTo SendSnap_Err

    DoCmd.SendObject acReport, "", "SnapshotFormat(*.snp)", "", "", "", "", "", True, ""

SendSnap_Exit:
    Exit Function

SendSnap_Err:
    If Err = 2487 Then
        MsgBox "Please close and reopen report before sending as Snapshot.", , "Reporting Error"
    End If
    Resume SendSnap_Exit

End Function

What out for word wrapping!

Regards,

Beth M
 
Old September 19th, 2003, 01:54 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Beth,

That worked perfectly. I don't know why it wasn't mentioned in the Microsoft Office documentation for the DoCmd.SendObject method.

Rand
 
Old September 19th, 2003, 01:59 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 174
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hard telling.. But unfortunately, there's alot that isn't documented I'm glad you got it working!

Regards,

Beth M
 
Old September 19th, 2003, 04:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 196
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Another wonderful undocumented Microsoft feature.

Oy!


Rand
 
Old May 3rd, 2005, 01:29 PM
Registered User
 
Join Date: Feb 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there a way to use Docmd.sendobject to send a table or query in CSV format as well?

-Raelz-





Similar Threads
Thread Thread Starter Forum Replies Last Post
Sending EMAIL charleshua BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 16 September 3rd, 2008 12:27 AM
sending email ansalon5 ASP.NET 1.0 and 1.1 Basics 2 June 27th, 2006 01:34 PM
Need Help in sending email khalidj06 Forum and Wrox.com Feedback 6 April 14th, 2006 08:16 AM
sending email keyvanjan Classic ASP Components 1 May 9th, 2005 05:56 PM
email sending msrnivas .NET Web Services 6 June 26th, 2004 06:59 AM





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