Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / September 2005

Tip: Looking for answers? Try searching our database.

Referencing a MailItem after it has been sent

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert Halford - 09 Sep 2005 16:18 GMT
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?
Sue Mosher [MVP-Outlook] - 09 Sep 2005 17:06 GMT
You'll need to retrieve it from the Sent Items folder using MAPIFolder.Items.Find.
Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> 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?
Robert Halford - 09 Sep 2005 17:52 GMT
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.
Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> 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?
Sue Mosher [MVP-Outlook] - 09 Sep 2005 18:42 GMT
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.
Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> How can I find the last item added to the sent items folder?
>
[quoted text clipped - 6 lines]
>>
>> Is this impossible or is there a way to do it?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.