Hello. I created a small application using Access 2K that sends emails using Outlook 2K. Until recently everything went fine. Something was changes in the Exchange server and all email are automatically sent without the user having the chance to review it.
It happens often that the user needs to make small custom modifications to the email before sending it. My idea was that perhaps the Access code could sent all emails to a folder other than the default Outbox folder. Now the person could review them before moving them to the Outbox. This is the code that I use:
Public Sub SendReceipt(strCorrespondentTitle As String, _
strCorrespondent As String, _
strCorrespondentLang As String, _
strEmail, _
strAuthorList As String)
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim strManuscriptName As String
Dim strMessageSubject As String
Dim strMessageBody As String
Set objOutlook = CreateObject("Outlook.Application"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
strMessageBody = strMessageBody & "Message here"
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(strEmail)
.Subject = strMessageSubject
.HTMLBody = strMessageBody
.SaveAs
.Send
End With
Set objOutlookRecip = Nothing
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub
Is there a way that I can stop the email from being sent and create it into another folder instead?
Thank you very much.
Daniel Lamarche
It happens often that the user needs to make small custom modifications to the email before sending it. My idea was that perhaps the Access code could sent all emails to a folder other than the default Outbox folder. Now the person could review them before moving them to the Outbox. This is the code that I use:
Public Sub SendReceipt(strCorrespondentTitle As String, _
strCorrespondent As String, _
strCorrespondentLang As String, _
strEmail, _
strAuthorList As String)
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim strManuscriptName As String
Dim strMessageSubject As String
Dim strMessageBody As String
Set objOutlook = CreateObject("Outlook.Application"
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
strMessageBody = strMessageBody & "Message here"
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(strEmail)
.Subject = strMessageSubject
.HTMLBody = strMessageBody
.SaveAs
.Send
End With
Set objOutlookRecip = Nothing
Set objOutlookMsg = Nothing
Set objOutlook = Nothing
End Sub
Is there a way that I can stop the email from being sent and create it into another folder instead?
Thank you very much.
Daniel Lamarche