'Getting MailItem in MailItem.Send - Event Handler
In my code, I'm generating an Email, which is then shown to the user so they can edit it before sending. After they're done with editing, I want to store the edited Email as a File, but I don't know how to access it after it has been sent. The most logical way to go about it seems to be to react to the Send - Event to store it as soon as the user sends it:
Dim oMail As Outlook.MailItem
'Fill oMail
oMail.Display()
AddHandler oMail.Send, AddressOf MailSent
However, the signature for MailSent has to look like this:
Private Sub MailSent(ByRef Cancel As Boolean)
I don't know how I would access the MailItem in MailSent since there's no sender object or anything of the like.
Maybe this isn't supposed to be possible and i'm supposed to read the last item in the Folder "Sent" Instead?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
