Not directly, but you could have the data report export as an html file and then email it as an attachment. I had to format and attach an excel file and send an automatic email
see code below:
Private Sub cmdSend_Click()
On Error GoTo ErrHand
DoEvents
'create and send email
Dim cdoFolder As MAPI.Folder
Dim cdoMessages As MAPI.Messages
Dim cdoMessage As MAPI.Message
Dim cdoRecipients As MAPI.Recipients
Dim cdoRecipient As MAPI.Recipient
StartMail:
Set CDOSession = New MAPI.Session
CDOSession.Logon "", , True, True, frmEmail.hwnd, False
Set cdoFolder = CDOSession.Outbox
Set cdoMessages = cdoFolder.Messages
Set cdoMessage = cdoMessages.Add
Dim cdoAttachments As MAPI.Attachments
Dim cdoAttachment As MAPI.Attachment
Set cdoAttachments = cdoMessage.Attachments
With cdoMessage
.Subject = dtebilldate & " " & RS!State & " " & RS!ban _
& " BILLING INQUIRY FORM" & _
" IC#: " & RSData!internalctrlnum
.Text = Space(2) & dtebilldate & " " & RS!State & " " & RS!ban _
& " BILLING INQUIRY FORM" & " IC#: " & RSData!internalctrlnum
ModifyAttachment
Set cdoAttachment = cdoAttachments.Add("ClaimForm.xls", Len(.Text) + 1, CdoFileData, App.Path & "\claimform.xls"
Set cdoRecipients = cdoMessage.Recipients
Set cdoRecipient = cdoRecipients.Add
cdoRecipient.Name = RS!emailadd
cdoRecipient.Resolve
.ReadReceipt = True
.Send (True)
End With
CDOSession.Logoff
Unload Me
Exit Sub
ErrHand:
Select Case Err.Number
Case -2147221233
MsgBox "Invalid Profile Selected.", vbCritical + vbOKOnly + vbApplicationModal, "Error"
Resume StartMail
Case -2147221223
MsgBox "Outlook is currently open or being used." & _
vbNewLine & "Please close Outlook and try again.", _
vbOKOnly + vbInformation + vbApplicationModal, "Close Program"
Resume StartMail
Case Else
Err.Raise Err.Number
End Select
End Sub