Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Reverse loop? (http://www.outlookbanter.com/outlook-vba/7353-reverse-loop.html)

yonina February 1st 06 08:46 AM

Reverse loop?
 

Hi,

I have the following loop:

For Each mail In Folder.Items
..
..
..

Next

The loop runs from the first email that was sent/accepted to the last one.
How can I make the loop go backwords? from the last email that was
sent/accepted to the first?



Michael Bauer February 1st 06 12:46 PM

Reverse loop?
 
Am Wed, 1 Feb 2006 00:46:29 -0800 schrieb yonina:

dim i&
For i=Folder.Items.Count to 1 step-1
set mail=Folder.Items(i)
Next

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi,

I have the following loop:

For Each mail In Folder.Items
.
.
.

Next

The loop runs from the first email that was sent/accepted to the last one.
How can I make the loop go backwords? from the last email that was
sent/accepted to the first?


yonina February 2nd 06 09:10 AM

Reverse loop?
 
Thank you!!!!!!!!!!!!!!!!!

That was exactly what I needed!!!!!!!!!!!!!!!!!!!

:)))

"Michael Bauer" wrote:

Am Wed, 1 Feb 2006 00:46:29 -0800 schrieb yonina:

dim i&
For i=Folder.Items.Count to 1 step-1
set mail=Folder.Items(i)
Next

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi,

I have the following loop:

For Each mail In Folder.Items
.
.
.

Next

The loop runs from the first email that was sent/accepted to the last one.
How can I make the loop go backwords? from the last email that was
sent/accepted to the first?




All times are GMT +1. The time now is 09:05 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com