[AccessD] Redemption question

Joe O'Connell joeo at appoli.com
Mon Nov 16 18:20:18 CST 2009


Charlotte,

That is what Max had suggested earlier.  It gives me the desired result
so it is a good solution.  I was just curious as to why the delete in
Redemption behaved differently.

Joe O'Connell


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

I haven't programmed it in several years so I don't recall, but you
should be able to copy the email to the deleted folder and then delete
it using redemption.  Wouldn't that accomplish the same thing?

Charlotte Foust 

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

Charlotte,

Is there a way to delete an email message from the inbox and have it
moved to the deleted items folder?

Joe O'Connell

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte
Foust
Sent: Monday, November 16, 2009 12:41 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Redemption question

Redemption doesn't work through Outlook.  It uses the CDO object
directly.

Charlotte Foust 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Joe O'Connell
Sent: Monday, November 16, 2009 8:02 AM
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