No attachment

Xenix

Registered User.
Local time
Today, 09:41
Joined
Oct 8, 2001
Messages
124
Anyone know how to send a report in an email as the main body not as an attachment?
frown.gif

I can only seem to send it as an attchment my code is:
DoCmd.SendObject acSendReport, "QuotationEMail", acFormatHTML, Me.Email2, , , "Honda Connectors Quotation", "Please find attached quotation:", True, "g:\Database\Email.htm"

I need the template file as it contains the company logos.

Thank you
Mike
 
Hi Mike,

Just wondering if you have solved this problem yet or not?

I have been trying to perform the same task but get errors.

Cheers,
K.
 
See my answer found here for instructions on how to do it.
 
Moniker,

Thanks for the quick response, and link.

The only problem with it is that I wont be expecting a customer auto-response with out the customer knowing.

Here is a copy of the code I am using at the moment to generate a table from a qry of a check box value that is set to true to recieve an e-mail.

Private Sub cmdSendEmailToAll_Click()

Dim strDocName As String
strDocName = "tblEmailIncluded"
DoCmd.OpenQuery "qryEmailIncluded"


On Error GoTo ErrHandle

Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim strAddress As String
Dim strTo As String
Dim strCC As String
Dim strBCC As String
Dim strSubject As String
Dim strText As String

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblEmailIncluded", dbOpenSnapshot)

If rst.BOF = True And rst.EOF = True Then
MsgBox "There must be an error in the query as there are no EMail Addresses listed!"
GoTo ErrExit
End If

With rst

.MoveFirst

strAddress = .Fields("EmailAddress").Value

strBCC = strAddress

.MoveNext

Do While .EOF = False
strAddress = .Fields("EmailAddress").Value
strBCC = strBCC & "; " & strAddress
.MoveNext
Loop
End With

strTo = ""
strCC = ""
strBCC = strBCC
strSubj = "Business_Name"
strText = Chr$(13) & Chr$(13) & "Kind regards," & Chr$(13) & "Business_Name" & Chr$(13) & Chr$(13) & "For More Information please visit our website at http://www_YourWebsite.com" & Chr$(13) & Chr$(13) & "To Un-Subscribe, Please reply to this message with Un-Subscribe in the subject box."

DoCmd.SendObject acSendNoObject, , acFormatHTML, strTo, , strBCC, strSubj, strText, True

ErrExit:
Exit Sub

ErrHandle:
MsgBox Err.Description
Resume ErrExit
Resume

End Sub

What I would like is for the DAP I created to be the message body text.
It is a generic page with an editable textbox.

thanks for your help with this.

K.
 

Users who are viewing this thread

Back
Top Bottom