I know you can delay the delivery of emails in ms outlook. Is there a way to establish that in vba through ms access? Below is the email code I am working with now.
Code:
Private Sub SendEmail_Click()
On Error GoTo SendEmail_Err
Dim myOlApp As Object
Dim myNameSpace As Object
Dim myFolder As Object
Dim myItem As Object
Dim myAttachments, myRecipient As Object
Dim recipient As String
Dim file_name As String
Dim mySubject As Object
Dim dbs As Object
Dim rst As Object
Dim strSQL As String
strSQL = "SearchEmail" 'Select the Query where you want your information to be drawn from
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset(strSQL)
rst.MoveFirst
While Not rst.EOF
recipient = "xxxx@example.com" 'This is the email address that you corresponds to your recipient"
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments
Set myRecipient = myItem.Recipients.Add(recipient)
myItem.BCC = ssss@example.com 'Enter any other email recipient that you want CC'd for this email
'"Message Subject String Here"
myItem.Subject = Me.EmailSubject
'"Put Message Body Text Here"
myItem.Body = "Dear Client" & "," & Chr(13) & Chr(10) & Chr(13) & Chr(10) & Me.EmailBody
myItem.Display
rst.MoveNext
Wend
DoCmd.Close acForm, "EmailToClients" 'Closes the form
DoCmd.OpenForm "EmailConfirmation" 'Opens Email Confirmation Form
Set myRecipient = Nothing
Set myAttachments = Nothing
Set myItem = Nothing
Set myOlApp = Nothing
Set rst = Nothing
SendEmail_Exit:
Exit Sub
SendEmail_Err:
MsgBox Err.Description
Resume SendEmail_Exit
End Sub