I have a simple, 2-table database for a small non-profit that keeps track of donors (tblDonor) and their donations (tblDonation). Using the DoCmd.SendObject command, I have Access open Outlook with the TO and SUBJECT lines filled in from the database and the donor's tax receipt attached. I add a note and send the email. This is a portion of the VBA code:
-----------------------------------
'Emails or prints receipt
Dim continue As Integer
continue = MsgBox("Check receipt details before proceeding.", vbOKCancel, "Donor's tax receipt")
If continue = vbOK Then
If Not IsNull(Forms!frmDonorDonation!EmailAddress) Then
DoCmd.SendObject acSendReport, "rptTaxReceipt", acFormatPDF, Forms!frmDonorDonation!EmailAddress, , "bwccr1955@gmail.com", "Tax Receipt Attached"
Else
DoCmd.RunCommand acCmdPrint
End If
Else
Exit Sub
End If
---------------------------
The problem is that Access opens Outlook in Plain Text format. I would prefer HTML format because I have a signature that includes the non-profit's logo. I have Outlook's " Compose messages" set for HTML format, so that's not the problem. When I Googled this problem, I get a solution that involes a massive amount of VBA code that doesn't use the DoCmd.SendObject command. Don't be overly impressed by my use of VBA code above. I adapted that code from a YouTube video on the subject. I'm hoping there is a simple line or two of code that I can add to the above to tell Outlook to open an new message in HTML text format. Can someone help?
-----------------------------------
'Emails or prints receipt
Dim continue As Integer
continue = MsgBox("Check receipt details before proceeding.", vbOKCancel, "Donor's tax receipt")
If continue = vbOK Then
If Not IsNull(Forms!frmDonorDonation!EmailAddress) Then
DoCmd.SendObject acSendReport, "rptTaxReceipt", acFormatPDF, Forms!frmDonorDonation!EmailAddress, , "bwccr1955@gmail.com", "Tax Receipt Attached"
Else
DoCmd.RunCommand acCmdPrint
End If
Else
Exit Sub
End If
---------------------------
The problem is that Access opens Outlook in Plain Text format. I would prefer HTML format because I have a signature that includes the non-profit's logo. I have Outlook's " Compose messages" set for HTML format, so that's not the problem. When I Googled this problem, I get a solution that involes a massive amount of VBA code that doesn't use the DoCmd.SendObject command. Don't be overly impressed by my use of VBA code above. I adapted that code from a YouTube video on the subject. I'm hoping there is a simple line or two of code that I can add to the above to tell Outlook to open an new message in HTML text format. Can someone help?