Confirming Outlook MailItem is Sent (1 Viewer)

JustMePatrick

New member
Local time
Today, 06:10
Joined
Aug 18, 2021
Messages
4
Hello and Greetings!👋

So, I've been researching this for the past couple of days and I'm finding myself rather stumped.:confused:

I've looked at a forum on here from a few years back along with the suggested links in the comments, plus a couple of other posts that I've found on other sites.

**Edit Note** I attempted to link to a previous post on here and to a post on mrexcel forum and it didn't let me :(.

Here is a snippet from my Email Function:

Code:
With oMail
    .Recipients.Add ToEmailAddress
    .CC = CCEmailaddress
    .Subject = "TEST, DISREGARD: Accuracy Report: Record #->" & tRecord
    .Body = "THIS IS A TEST. DISREGARD." & vbCrLf & "New Accuracy Report see attachement."
    .Attachments.Add FileFolder & "\" & FileName
    If MsgBox("Do you wish to Edit the Notification before Sending?" & vbCrLf & "Click Yes to Edit" & vbCrLf & "Click No to Send", vbQuestion + vbYesNo, "Question") = vbNo Then
        .Send
        Else
        .Display True
    End If

End With

'Some code displaying a model form alerting the user of a successful email sent.

Relating to the .Display True. I want to know when either the email message is either Sent or Closed. I'm not quite understanding of how to see that the E-mail Sent is True or the Email was closed without sending it is True, then take action based on that information.

I look forward to reading your suggestions.
 

Ranman256

Well-known member
Local time
Today, 06:10
Joined
Apr 9, 2015
Messages
4,337
.display=true, does not send the message. Its now a manual event. Click Send.
 

JustMePatrick

New member
Local time
Today, 06:10
Joined
Aug 18, 2021
Messages
4
.display=true, does not send the message. Its now a manual event. Click Send.
I understand .display True forces Outlook to display the message as modal. I want to know when the user clicks Send or clicks the x to close.
 

Minty

AWF VIP
Local time
Today, 11:10
Joined
Jul 26, 2013
Messages
10,375
There is no True switch for displaying a mail item that I can find.
It is either .Send or .Display

If they cancel the sending it will raise an error, that you can capture and that will tell you it hasn't been sent.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 05:10
Joined
Feb 28, 2001
Messages
27,327
If you have a way to identify the message, look for it in the .Sent folder. It doesn't go there until it is sent. Until then it is either .Outfox or .Draft (I think .Outbox for programmatic sending, .Draft for manual sending where you close the window without sending).
 

JustMePatrick

New member
Local time
Today, 06:10
Joined
Aug 18, 2021
Messages
4
Thanks All, I did get this figured out today and it works quite well. I'll reply back with details tomorrow or Friday if I have time. :)
 

Users who are viewing this thread

Top Bottom