Sub DéplacerLeMessage()
On Error Resume Next
Dim i As Integer
Dim objFolder As Outlook.MAPIFolder, objInbox As Outlook.MAPIFolder
Dim objNS As Outlook.NameSpace, objItem As Outlook.MailItem
Set objNS = Application.GetNamespace("MAPI")
Set objInbox = objNS.GetDefaultFolder(olFolderInbox)
Set objFolder = objInbox.Folders("Temp")
objFolder.Display
For Each objItem In Application.ActiveExplorer
If objFolder.DefaultItemType = olMailItem Then
If objItem.Subject = "Commande" Then
objItem.Move objFolder
End If
End If
Next
Set objItem = Nothing
Set objFolder = Nothing
Set objInbox = Nothing
Set objNS = Nothing
End Sub