Referencing a MailItem after it has been sent

  • Thread starter Thread starter Robert Halford
  • Start date Start date
R

Robert Halford

I've been searching all afternoon to find a way of referencing an email
after it has been sent from Outlook - there are plenty of people asking how
to do this but I can't find any replies.

Is this impossible or is there a way to do it?
 
You'll need to retrieve it from the Sent Items folder using MAPIFolder.Items.Find.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
How can I find the last item added to the sent items folder?

You'll need to retrieve it from the Sent Items folder using
MAPIFolder.Items.Find.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Use the MAPIFolder.Items.Sort method to sort on the SentOn property and then Items.GetFirst or GetLast, as appropriate.

That's not the best method, though, since if there are multiple items waiting to be delivered to the server, you have no control over what order they'll appear in Sent Items (or in fact, when they'll appear in Sent Items -- that depends on Outlook's email configuration). I would instead set a property value on the item that can be used for retrieval with Items.Find.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top