[AccessD] Redemption question

Max Wanadoo max.wanadoo at gmail.com
Mon Nov 16 10:24:53 CST 2009


Don't use it Joe, I use ClickYes for the YES response.
Never used Redemption.

Max


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Joe O'Connell
Sent: 16 November 2009 16:02
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Redemption question

Max,

Thanks for the suggestion, I will give it a try.

I would still like to better understand Redemption.  Can anyone shed any
light on why Redemption behaves differently from Outlook?

Joe O'Connell

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo
Sent: Monday, November 16, 2009 10:51 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Redemption question

Joe, change it to so that it moves the email to another folder,  in this
case the delete folder.
I cannot give you the code right now, but it should be easy enough to
find
with intellisense.

Max


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Joe O'Connell
Sent: 16 November 2009 14:27
To: Access Developers discussion and problem solving
Subject: [AccessD] Redemption question

What is the proper way to use Redemption to move email messages from the
inbox to the deleted items folder?

An Access 2003 application had been using Outlook objects to read each
email in the inbox, process it, and then delete it.  The delete behaved
just like Outlook - the email was moved to the deleted items folder.
Requirements changed and properties needed to be accessed that caused
the "confirmation" message box to be displayed.  To eliminate the
message box, the code was changed to use Redemption.  The processing of
the emails is working properly, but the delete now deletes the emails
completely from Outlook instead of moving them to the deleted items
folder.  Business rules require all email messages to be retained for a
specific period of time after being processed.

Here is the relevant code:
   
    Dim i As Integer
    Dim lngNumItems As Long
    Dim Session As Object, Folder As Object, olItems As Object
    
    Set Session = CreateObject("Redemption.RDOSession")
    Session.Logon
    Set Folder = Session.GetDefaultFolder(olFolderInbox)
    lngNumItems = Folder.Items.Count                   
    Set olItems = Folder.Items                         

    If lngNumItems > 0 Then
        For i = 1 To lngNumItems
            .... process email, works OK .......
        Next i
    
        For i = lngNumItems To 1 Step -1
            olItems(i).Delete
        Next i
    End If

Any help on how to change the "olItems(i).Delete" statement to move the
email to the deleted items folder is greatly appreciated.

Joe O'Connell

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list