Results 1 to 4 of 4

Thread: get Outlook SentFolder last item

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2005
    Posts
    4

    get Outlook SentFolder last item

    I need to log certain information regarding a message I'm sending from within Access (using Redemption). So I tried to hook into the sentfolder.itemadd event, but I am not able to reliably capture that event (I'm sending the message and immediately try to get its entryid, but if the message has some large attachments it doesn't make it into the sent folder fast enough).

    Any suggestions?

    Thanks to all!
    VB Code:
    1. Option Compare Database
    2. Option Explicit
    3.  
    4. Dim WithEvents ObjOutlook As Outlook.Application, myNameSpace As Object
    5. Dim WithEvents objInspectors As Outlook.Inspectors
    6. Dim WithEvents objOpenInspector As Outlook.Inspector
    7. Dim WithEvents objMailItem As Outlook.MailItem
    8. Dim WithEvents colSentItems As Items
    9.  
    10. Dim sMailItem As Redemption.SafeMailItem, boSent As Boolean
    11. Dim sInspector As Redemption.SafeInspector
    12. Public Sub Class_Initialize()
    13.     boSent = False
    14.     Set ObjOutlook = CreateObject("Outlook.Application", "localhost")
    15.     Set objInspectors = ObjOutlook.Inspectors
    16. .........................................................................................
    17.  
    18. Private Sub colSentItems_ItemAdd(ByVal Item As Object)
    19. Dim strEntryID As String, sItem As Redemption.SafeMailItem
    20.  
    21. If Item.Class = olMail Then
    22.     Item.Save
    23.     Set sItem = CreateObject("Redemption.SafeMailItem")
    24.     sItem.Item = Item
    25.    
    26.     strEntryID = sItem.EntryID
    27.      vcLOG_SENT_EMAIL (strEntryID)
    28. End If
    Last edited by RobDog888; Aug 12th, 2005 at 10:54 AM. Reason: Added vbcode tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width