A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Speed up moving items



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old May 26th 06, 04:29 AM posted to microsoft.public.outlook.program_vba
Kemal
external usenet poster
 
Posts: 3
Default Speed up moving items

I'm trying somehow to imitate Gmail feature, which moves archived items back
into the Inbox when a new email with the same subject line arrives.
I have implemented following which will be called each time an email arrives
and moves all emails with same Conversation topic back to the Inbox. It seems
to work, but takes very long with only 1400 items in my Archive folder. Any
idea how I can speed this up?
Thanks
Kemal

Sub Test()
MoveEmails ("Considered test defects")
End Sub

Sub MoveEmails(myConvTopic As String)
Dim persFolders, myArchiveFolder, myDestFolder As Outlook.MAPIFolder
Dim i As Integer
Dim myItem As Outlook.MailItem
Set myDestFolder = Application.Session.GetDefaultFolder(olFolderInbox )
Set persFolders = Application.Session.Folders.Item(3)
Set myArchiveFolder = persFolders.Folders.Item(7)
mailCount = myArchiveFolder.Items.Count
For i = mailCount To 1 Step -1
If myArchiveFolder.Items(i).Class = olMail Then
Set myItem = myArchiveFolder.Items(i)
If myItem.ConversationTopic = myConvTopic Then
myItem.Move myDestFolder
End If
End If
Next
End Sub

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Speed Dialing - Outlook 2002 Bernard Outlook - Using Contacts 0 May 23rd 06 04:55 PM
Outlook 2002 Speed Dialing Bernard Outlook - Using Contacts 0 May 15th 06 09:51 AM
Moving Specific Inbox Items to a Specific Subfolder (VBA) DevDaniel Outlook and VBA 1 April 11th 06 05:46 AM
Moving items to folders does not work SSI Outlook - General Queries 0 February 8th 06 04:11 AM
Moving a Mix of Mail Items and Report Items Steve Roberts Outlook and VBA 1 January 24th 06 10:36 PM


All times are GMT +1. The time now is 06:49 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright Đ2004-2025 Outlook Banter.
The comments are property of their posters.