darshanhiranandani24
New member
- Local time
- Today, 07:51
- Joined
- Sep 13, 2024
- Messages
- 4
Hi everyone,
I'm Darshan Hiranandani, working on a simple database for a small non-profit to manage donor information and tax receipts. I'm using the DoCmd.SendObject command in Access to open Outlook with pre-filled TO, SUBJECT, and an attached tax receipt PDF. The issue I'm facing is that Outlook opens in Plain Text format by default, even though I have it set to compose messages in HTML format.
Here’s the VBA code I’m using:
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
Although Outlook is set to compose in HTML, it still opens in Plain Text format. I would prefer a simple solution to make the email open in HTML format, as I use a signature with the non-profit’s logo. I’ve seen solutions involving a lot of extra code that bypasses DoCmd.SendObject, but I’m hoping there’s a quick fix I can apply to my existing code.
Can anyone suggest a line or two of code that would force Outlook to open the email in HTML format?
Thanks!
Regards
Darshan Hiranandani
I'm Darshan Hiranandani, working on a simple database for a small non-profit to manage donor information and tax receipts. I'm using the DoCmd.SendObject command in Access to open Outlook with pre-filled TO, SUBJECT, and an attached tax receipt PDF. The issue I'm facing is that Outlook opens in Plain Text format by default, even though I have it set to compose messages in HTML format.
Here’s the VBA code I’m using:
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
Although Outlook is set to compose in HTML, it still opens in Plain Text format. I would prefer a simple solution to make the email open in HTML format, as I use a signature with the non-profit’s logo. I’ve seen solutions involving a lot of extra code that bypasses DoCmd.SendObject, but I’m hoping there’s a quick fix I can apply to my existing code.
Can anyone suggest a line or two of code that would force Outlook to open the email in HTML format?
Thanks!
Regards
Darshan Hiranandani