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?
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?
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