how to mail a report as an attachment in outlook?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kathnicole
    New Member
    • Mar 2007
    • 33

    how to mail a report as an attachment in outlook?

    I have a report called rptQuote created based on parameter query.
    and i was not sure how to email the current report in outlook.

    can anyone help me in this regard?

    thanks,
    Kathy
  • Jim Doherty
    Recognized Expert Contributor
    • Aug 2007
    • 897

    #2
    Originally posted by kathnicole
    I have a report called rptQuote created based on parameter query.
    and i was not sure how to email the current report in outlook.

    can anyone help me in this regard?

    thanks,
    Kathy
    Basically look at the macro command for 'SendObject' and have a play with that. You can send the report out in various formats HTML,RTF etc, but beware the output is not always representative of your original report because of the complexity of some reports and conversion assumptions made by the command. Its best using this method, if you can keep your reports simple with no controls overlapping and so on. There are plenty of threads started where questions have been asked as to why this command fails to output in the manner you completely expect sometimes.

    If you need to do this in code as well, then look at the VBA source code underlying the use of the respective macro. You can access this by selecting your manually created macro, then going to the TOOLs menu then MACRO then CONVERT MACRO TO VISUAL BASIC. You will then see the arguments that constitute the the command itself in the modules window where it will say something like "Converted Macro- Macro1" where macro1 is the name of the macro you created. (double click the freshly created module to view the code)

    Depending on the dynamics of what you actually require, you might find that SNAPSHOT format is the most representative as it does what it says on the tin... it takes an image snapshot of your report that can be saved as a file with the extension .SNP that you can email as the attachment. This is as you might expect an 'uneditable' image and therefore its file size is larger. (So if you output a hundred records as a snapshot expect your email client to take an eon to send the file.) In addition to this the Snapshot viewer that comes as part of Office is required on the recipients machine in order to view it.

    Hope this helps you

    Jim

    Comment

    Working...