RonMcIntire
Technical User
What's going on here?
Access program I've been using for years now throws an error message ". . .can't send this email message" when I try to email a message to individuals in my database.
Windows 8.1 64bit
Windows update thru December rollup.
MS Office 2007 Pro (Purchased license from Ebay)
Access File saved in 2003 format
Have not tried any fixes because I don't fully understand suggested fixes found on google.
Basically, I create a report with my data then with sendobject send the attached data to my recipients.
Here's my code:
Private Sub cmdPrintRec_Click()
On Error GoTo Err_cmdPrintRec_Click
Dim strDocName As String
Dim strWhere As String
Dim strMsg As String
Dim strMsg1, strMsg2, strMsg3, strMsg4, strMsg5 As String
Dim strCCTo, strBCCTo, strSubject As String
strDocName = "rptDIRECTORY Check"
strWhere = "[MemberID]=" & Me!MemberID
strMsg1 = "It's time to review and update the chapter directory again."
strMsg2 = "Please look over each item in the attached file and let me know WHETHER OR NOT there are any changes."
strMsg3 = "* * * IF ANY INFORMATION HAS CHANGED, BE SURE TO CONTACT THE CHAPTER SECRETARY SO HE CAN NOTIFY THE SOCIETY. * * *"
strMsg4 = "Thanks,"
strMsg5 = "Ron McIntire" & Chr(10) & Chr(13) & "Chapter Directory Editor"
strMsg = Me.NICKNAME & ":" & Chr(10) & Chr(10) & Chr(13) & strMsg1 & Chr(10) & Chr(10) & Chr(13) & strMsg2 & Chr(10) & Chr(10) & Chr(13) & strMsg3 & Chr(10) & Chr(10) & Chr(13) & strMsg4 & Chr(10) & Chr(10) & Chr(13) & strMsg5
strCCTo = "RAMcIntire@comcast.net" 'Additional email addreses go here
strBCCTo = "" 'Additional blind email addrresses go here
DoCmd.OpenReport strDocName, acPreview, , strWhere
'The next line sends the report in RTF format.
'This can be changed to several formats, search the help file for acFormatRTF.
DoCmd.SendObject acSendReport, strDocName, acFormatRTF, Me!nEmail, strCCTo, strBCCTo, "Chapter directory update" & " (" & Me.NICKNAME & " " & Me.LNAME & ")", strMsg, -1
'DoCmd.SendObject acSendReport, strDocName, acFormatRTF, Me!nEMAIL, strCCTo, strBCCTo, "Chapter directory update", strMsg, -1
DoCmd.Close
nRecSent = Date
Exit_cmdPrintRec_Click:
Exit Sub
Err_cmdPrintRec_Click:
MsgBox err.Description
Resume Exit_cmdPrintRec_Click
'MsgBox "This form is incomplete." & vbNewLine & vbNewLine & "Modify the code per the in-line comments", , "Send E-Mail"
End Sub
Any help appreciated
Ron
Access program I've been using for years now throws an error message ". . .can't send this email message" when I try to email a message to individuals in my database.
Windows 8.1 64bit
Windows update thru December rollup.
MS Office 2007 Pro (Purchased license from Ebay)
Access File saved in 2003 format
Have not tried any fixes because I don't fully understand suggested fixes found on google.
Basically, I create a report with my data then with sendobject send the attached data to my recipients.
Here's my code:
Private Sub cmdPrintRec_Click()
On Error GoTo Err_cmdPrintRec_Click
Dim strDocName As String
Dim strWhere As String
Dim strMsg As String
Dim strMsg1, strMsg2, strMsg3, strMsg4, strMsg5 As String
Dim strCCTo, strBCCTo, strSubject As String
strDocName = "rptDIRECTORY Check"
strWhere = "[MemberID]=" & Me!MemberID
strMsg1 = "It's time to review and update the chapter directory again."
strMsg2 = "Please look over each item in the attached file and let me know WHETHER OR NOT there are any changes."
strMsg3 = "* * * IF ANY INFORMATION HAS CHANGED, BE SURE TO CONTACT THE CHAPTER SECRETARY SO HE CAN NOTIFY THE SOCIETY. * * *"
strMsg4 = "Thanks,"
strMsg5 = "Ron McIntire" & Chr(10) & Chr(13) & "Chapter Directory Editor"
strMsg = Me.NICKNAME & ":" & Chr(10) & Chr(10) & Chr(13) & strMsg1 & Chr(10) & Chr(10) & Chr(13) & strMsg2 & Chr(10) & Chr(10) & Chr(13) & strMsg3 & Chr(10) & Chr(10) & Chr(13) & strMsg4 & Chr(10) & Chr(10) & Chr(13) & strMsg5
strCCTo = "RAMcIntire@comcast.net" 'Additional email addreses go here
strBCCTo = "" 'Additional blind email addrresses go here
DoCmd.OpenReport strDocName, acPreview, , strWhere
'The next line sends the report in RTF format.
'This can be changed to several formats, search the help file for acFormatRTF.
DoCmd.SendObject acSendReport, strDocName, acFormatRTF, Me!nEmail, strCCTo, strBCCTo, "Chapter directory update" & " (" & Me.NICKNAME & " " & Me.LNAME & ")", strMsg, -1
'DoCmd.SendObject acSendReport, strDocName, acFormatRTF, Me!nEMAIL, strCCTo, strBCCTo, "Chapter directory update", strMsg, -1
DoCmd.Close
nRecSent = Date
Exit_cmdPrintRec_Click:
Exit Sub
Err_cmdPrintRec_Click:
MsgBox err.Description
Resume Exit_cmdPrintRec_Click
'MsgBox "This form is incomplete." & vbNewLine & vbNewLine & "Modify the code per the in-line comments", , "Send E-Mail"
End Sub
Any help appreciated
Ron