hi all,
I have theis code below in order to send query through outlook.
how can I display the mail and not directly sending it?
Private Sub Command64_Click()
Dim message As String
Dim rs As Recordset
Dim vRecipientList As String
Dim vMsg As String
Dim vSubject As String
Set rs = CurrentDb.OpenRecordset("SELECT * FROM Mail_list")
If rs.RecordCount > 0 Then
rs.MoveFirst
Do
If Not IsNull(rs!email) Then
vRecipientList = vRecipientList & rs!email & ";"
rs.MoveNext
Else
rs.MoveNext
End If
Loop Until rs.EOF
vMsg = "You have open Service Cost PMT Action Items assigned to you!(see attached)" & vbCrLf & "please update your AI status in the SharePoint : http://ent111.sharepoint.hp.com/teams/servicecr/Lists/Action%20Items/Karin.aspx"
vSubject = "Service Cost AI"
DoCmd.SendObject acSendQuery, "Service_Cost_AI", , vRecipientList, , , vSubject, vMsg, False
MsgBox ("Report successfully eMailed!")
End With
Else
MsgBox "No contacts."
End If
Exit Sub
End Sub
I have theis code below in order to send query through outlook.
how can I display the mail and not directly sending it?
Private Sub Command64_Click()
Dim message As String
Dim rs As Recordset
Dim vRecipientList As String
Dim vMsg As String
Dim vSubject As String
Set rs = CurrentDb.OpenRecordset("SELECT * FROM Mail_list")
If rs.RecordCount > 0 Then
rs.MoveFirst
Do
If Not IsNull(rs!email) Then
vRecipientList = vRecipientList & rs!email & ";"
rs.MoveNext
Else
rs.MoveNext
End If
Loop Until rs.EOF
vMsg = "You have open Service Cost PMT Action Items assigned to you!(see attached)" & vbCrLf & "please update your AI status in the SharePoint : http://ent111.sharepoint.hp.com/teams/servicecr/Lists/Action%20Items/Karin.aspx"
vSubject = "Service Cost AI"
DoCmd.SendObject acSendQuery, "Service_Cost_AI", , vRecipientList, , , vSubject, vMsg, False
MsgBox ("Report successfully eMailed!")
End With
Else
MsgBox "No contacts."
End If
Exit Sub
End Sub