![]() |
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 simple code that moves messages into another PST file. But each
message moved gets it's received date changed to the current date time which is useless. Any workarounds? Thanks, James. Dim objOutlookApplication As Application Dim objNameSpace As NameSpace Dim objInbox As MAPIFolder Dim objMessage As MailItem Set objOutlookApplication = CreateObject("Outlook.Application") Set objNameSpace = objOutlookApplication.GetNamespace("MAPI") Set objInbox = objNameSpace.GetDefaultFolder(olFolderInbox) For Each objMessage In objInbox.Items If objMessage.SenderEmailAddress = " Then objMessage.Move objNameSpace.Folders("Example Folder").Folders("Subfolder") End If Next |
Ads |
#2
|
|||
|
|||
![]()
Strange, I'm not experiencing that behaviour. Are you sure you're not
looking at the Modified field in the view? That will get timestamped when the message is moved; all others (Received, Sent, Created) should retain the original value. -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ " wrote: I have simple code that moves messages into another PST file. But each message moved gets it's received date changed to the current date time which is useless. Any workarounds? Thanks, James. Dim objOutlookApplication As Application Dim objNameSpace As NameSpace Dim objInbox As MAPIFolder Dim objMessage As MailItem Set objOutlookApplication = CreateObject("Outlook.Application") Set objNameSpace = objOutlookApplication.GetNamespace("MAPI") Set objInbox = objNameSpace.GetDefaultFolder(olFolderInbox) For Each objMessage In objInbox.Items If objMessage.SenderEmailAddress = " Then objMessage.Move objNameSpace.Folders("Example Folder").Folders("Subfolder") End If Next |
#3
|
|||
|
|||
![]()
Yes, it is the Received field that is changed. I've seen similar
reports on other forums. I'm using Outlook 2003. Might have something to do with the email being moved to a separate PST file? |
#4
|
|||
|
|||
![]()
Is it being moved from an Exchange mailbox to PST? Or from one PST to
another PST? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool wrote in message ps.com... Yes, it is the Received field that is changed. I've seen similar reports on other forums. I'm using Outlook 2003. Might have something to do with the email being moved to a separate PST file? |
#5
|
|||
|
|||
![]()
FYI, my tests show no difference in either situation.
-- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Dmitry Streblechenko" wrote: Is it being moved from an Exchange mailbox to PST? Or from one PST to another PST? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool wrote in message ps.com... Yes, it is the Received field that is changed. I've seen similar reports on other forums. I'm using Outlook 2003. Might have something to do with the email being moved to a separate PST file? |
#6
|
|||
|
|||
![]() Dmitry Streblechenko wrote: Is it being moved from an Exchange mailbox to PST? Or from one PST to another PST? It's being moved from one PST to another, both of which are "open" in my Outlook session. I know others have seen this problem but it must be rare. Wonder why I've caught it :-( |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I get my correct date sent/received headers back? | malarkey | Outlook Express | 8 | August 28th 06 02:18 PM |
Help moving message with VBA | Murphybp2 | Outlook and VBA | 1 | August 15th 06 08:01 AM |
Moving data from Form Item to olMailItem | djohnson | Outlook - Using Forms | 5 | August 10th 06 06:41 AM |
Group By Flag Status and then Received date | [email protected] | Outlook - General Queries | 0 | June 10th 06 01:53 AM |
Exporting Date received and Date Sent to Access | Sugarthebeet | Outlook - General Queries | 1 | January 19th 06 09:06 PM |