My name is David. I work for Discover Financial. I have about 2 1/2 years working with Access 2010-2013.
I've met my share of road blocks and stumpers but for the most part have figured things out on my own and via other online resources. However, I am really stumped now.
In a nutshell, I am working with an Access form. I've created a button that will email the current record DATA the user is looking at to Outlook. I've managed to do this using VBA except the email that will be outgoing does not appear as rich text format. If the user wants to add or revise font color or size a bit before sending out, they can't because things are grayed out. Here is the coding I'm using, what am I missing or doing wrong??
Private Sub cmdSendEMail1_Enter()
On Error Resume Next
Dim strTo As String
Dim strCC As String
Dim strBCC As String
Dim strSubject As String
Dim strMessageBody As String
strTo = DLookup("[Requester]", "tblFixedEMail")
strCC = "dmac AT helpme DOT com; dmac AT cantfigureitout DOT com;" & DLookup("[PS_Email]", "tblFixedEMail")
strBCC = DLookup("[FixedBCC]", "tblFixedEMail")
strSubject = DLookup("[VM R1]", "tblFixedEMail") & " - " & DLookup("[Corporate_Supplier Name]", "tblFixedEMail") & " - " & DLookup("[Relationship Name]", "tblFixedEMail") & ": " & "Moderate - In Scope for a PSVR Assessment - BU Action Needed"
strMessageBody = "<---This is an automatically generated email. Please do not respond.---->"
DoCmd.SendObject acSendNoObject, acFormatRTF, , strTo, strCC, strBCC, strSubject, strMessageBody
If Err = 2501 Then Err.Clear
End Sub
======================
I do want to mention that when I remove the "strMessageBody" for that last "DoCmd.SendObject" command line, the email DOES populate as rich text format.......it's only when I add "strMessageBody" back to the line that it doesn't take....things go back to being grayed out again. I've also noticed that my signature block does not auto-populate at the bottom of the body of the email in either scenario as it usually does when normally creating a new email in Outlook.
(BTW, I am aware that users have the ability to change the format from text to rich once they ARE in Outlook...... but would be great to have to bypass those one or two steps. Not lazy....just hate when I'm stumped!!!) ;-)
Any assistance would be GREATLY appreciated thank you!
DM
I've met my share of road blocks and stumpers but for the most part have figured things out on my own and via other online resources. However, I am really stumped now.
In a nutshell, I am working with an Access form. I've created a button that will email the current record DATA the user is looking at to Outlook. I've managed to do this using VBA except the email that will be outgoing does not appear as rich text format. If the user wants to add or revise font color or size a bit before sending out, they can't because things are grayed out. Here is the coding I'm using, what am I missing or doing wrong??
Private Sub cmdSendEMail1_Enter()
On Error Resume Next
Dim strTo As String
Dim strCC As String
Dim strBCC As String
Dim strSubject As String
Dim strMessageBody As String
strTo = DLookup("[Requester]", "tblFixedEMail")
strCC = "dmac AT helpme DOT com; dmac AT cantfigureitout DOT com;" & DLookup("[PS_Email]", "tblFixedEMail")
strBCC = DLookup("[FixedBCC]", "tblFixedEMail")
strSubject = DLookup("[VM R1]", "tblFixedEMail") & " - " & DLookup("[Corporate_Supplier Name]", "tblFixedEMail") & " - " & DLookup("[Relationship Name]", "tblFixedEMail") & ": " & "Moderate - In Scope for a PSVR Assessment - BU Action Needed"
strMessageBody = "<---This is an automatically generated email. Please do not respond.---->"
DoCmd.SendObject acSendNoObject, acFormatRTF, , strTo, strCC, strBCC, strSubject, strMessageBody
If Err = 2501 Then Err.Clear
End Sub
======================
I do want to mention that when I remove the "strMessageBody" for that last "DoCmd.SendObject" command line, the email DOES populate as rich text format.......it's only when I add "strMessageBody" back to the line that it doesn't take....things go back to being grayed out again. I've also noticed that my signature block does not auto-populate at the bottom of the body of the email in either scenario as it usually does when normally creating a new email in Outlook.
(BTW, I am aware that users have the ability to change the format from text to rich once they ARE in Outlook...... but would be great to have to bypass those one or two steps. Not lazy....just hate when I'm stumped!!!) ;-)
Any assistance would be GREATLY appreciated thank you!
DM
Last edited: