Email 2 reports at once

C

channell

Is there a way I can take this code, but insert another report in as well so
both reports are attachments in 1 email? Thanks a ton, and I appreciate your
help in advance!

The one report I have in here working already is "r6135EMAIL2". I also want
to put in another report called "r6135FOREMAIL".

Private Sub Command49_Click()
On Error GoTo Err_Command49_Click

Dim stDocName As String

stDocName = "r6135EMAIL2"
DoCmd.SendObject acReport, stDocName

Exit_Command49_Click:
Exit Sub

Err_Command49_Click:
MsgBox Err.Description
Resume Exit_Command49_Click

End Sub
 
R

Rick Brandt

Is there a way I can take this code, but insert another report in as
well so both reports are attachments in 1 email? Thanks a ton, and I
appreciate your help in advance!

SendObject cannot send more than one attachment. You might be able to
create a container report and embed your two reports as sub-reports and
then attach the container report.

If you use code to manipulate an external messaging library (CDOSys or
Outlook) instead of using SendObject then you can have as many
attachments as you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top