![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I have a script that will move the email from a specific person to an archive
folder. The problem is that thg received date is reset to the date and time of when the script is ran. Is this normal behaviour? if so is there a way around it? Code is as follows..... Function Quote(MyText) Quote = Chr(34) & MyText & Chr(34) End Function 'On Error Resume Next Const olFolderInbox = 6 Set objOutlook = CreateObject("Outlook.Application") Set objNamespace = objOutlook.GetNamespace("MAPI") Set objInbox = objNamespace.GetDefaultFolder(olFolderInbox) 'Set objfolder = objNamespace.GetDefaultFolder(olFolderInbox) Set objFolder = objNamespace.GetDefaultFolder(olFolderInbox) set objFolder = objFolder.Folders("z_archive") 'Set objFolder = objFolder.Folders("2008") Set colItems = objInbox.Items Set colItems = objInbox.Items Set objItem = colItems.Find("[SenderName] = 'PersonA'") 'Set objItem = colItems.Find strSearch Do While TypeName(objItem) "Nothing" objItem.Move objFolder Set objItem = colItems.FindNext Loop Eventually i'll be wanting to change the filer to a date but this code doesnt pick up anything strSearch = "[Start] = " & _ Quote("January 1, 2008 00:00") & _ " AND [End] " & _ Quote("December 31, 2008 23:59") Set objItem = colItems.Find strSearch Could someone advise what i'm missing please? Thanks |
Ads |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Move email to directory folder, and then move email to another fol | margarita25 | Outlook and VBA | 3 | January 26th 09 03:35 PM |
How can I get Outlook 2003 (IMAP) to automatically move Junk-email to the junk folder ? | [email protected] | Outlook - General Queries | 1 | July 4th 07 05:38 PM |
Can't move an email message that's already been moved: OL 2003 | [email protected] | Outlook - General Queries | 2 | December 31st 06 11:53 PM |
move outlook exp mailbox 2 2003 w/o merging it w/business email | 2houndmom | Outlook - Installation | 3 | December 9th 06 03:55 AM |
how to recover email if missing message when using rule to move from exchange server to 2003 pst | Patrick | Outlook - General Queries | 1 | August 31st 06 06:07 AM |