Hi guys, I am completely in the dark but managed to piece together some coding that allows me to email directly from an Access Form. When I click my "Send email" command button, my Outlook opens and the Subject and To lines are filled in correctly, but I can't figure out how to get the body to fill in as well. This is what I have:
Private Sub Command66_Click()
Dim stLinkCriteria As String
Dim Subject As String
Dim Text As String
Dim Message As String
If IsNull([RepEmail1]) Or ([RepEmail1]) = "" Then
MsgBox "There is no E-mail address entered for this person!"
Exit Sub
Else
stLinkCriteria = Me![RepEmail1]
stSubject = "Mobile Lab Cadaver Disposal Fee"
stText = "Test"
DoCmd.SendObject acSendNoObject, , , stLinkCriteria, , , stSubject
End If
End Sub
I have looked at a bunch of other code and replaced Text with everything from Body to MessageText with no success. I want my email to read
Text = "A " & [CadaverType] & "was used during the mobile lab on "& [LabDate] & ". The disposal fee for this is $40.00. Please let me know if you want to accept the full amount of this charge. If this charge should be broken up between reps, please let me know who should be charged and how much. Thank you"
Any help would be greatly appreciated. I am going crazy trying to get this to work. Thanks!
Private Sub Command66_Click()
Dim stLinkCriteria As String
Dim Subject As String
Dim Text As String
Dim Message As String
If IsNull([RepEmail1]) Or ([RepEmail1]) = "" Then
MsgBox "There is no E-mail address entered for this person!"
Exit Sub
Else
stLinkCriteria = Me![RepEmail1]
stSubject = "Mobile Lab Cadaver Disposal Fee"
stText = "Test"
DoCmd.SendObject acSendNoObject, , , stLinkCriteria, , , stSubject
End If
End Sub
I have looked at a bunch of other code and replaced Text with everything from Body to MessageText with no success. I want my email to read
Text = "A " & [CadaverType] & "was used during the mobile lab on "& [LabDate] & ". The disposal fee for this is $40.00. Please let me know if you want to accept the full amount of this charge. If this charge should be broken up between reps, please let me know who should be charged and how much. Thank you"
Any help would be greatly appreciated. I am going crazy trying to get this to work. Thanks!