tags:

views:

355

answers:

2

While using a macro in outlook to move an email into a subfolder, the receipt date is not preserved.

Does anyone has an idea on how to avoid that?

A: 

Could you post the code you're using to do this?

Stan Scott
A: 

Not an answer.. but here is some code that replicates the problem. Can't seem to find an answer to this anywhere. Quite a few people asking the question though.

Sub MoveToFolder(objFolder As Outlook.MAPIFolder) 'On Error Resume Next If objFolder Is Nothing Then MsgBox "This folder doesn't exist!", vbOKOnly + vbExclamation, "INVALID FOLDER" End If

If Application.ActiveExplorer.Selection.Count = 0 Then
    Exit Sub
End If

Dim objItem As Outlook.MailItem
For Each objItem In Application.ActiveExplorer.Selection
    If objFolder.DefaultItemType = olMailItem Then
        If objItem.Class = olMail Then
            objItem.Move objFolder
        End If
    End If
Next

Set objItem = Nothing
Set objFolder = Nothing

End Sub

Mike Walsh
duplicate of http://stackoverflow.com/questions/1033556/outlook-2003-vba-movin-e-mails-without-changing-the-date
Mike Walsh