L
Lux
As above really, i want to be able to move all my inbox
items into another outlook folder..
any pointers?
i've tried the following, yes it works but only for one
person, i need to move them all..
i also need to schedule this, how do i schedule a macro to
run, say every 10 mins?
Public Sub MoveMessages()
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myInbox = myNameSpace.GetDefaultFolder(olFolderInbox)
Set myItems = myInbox.Items
Set myDestFolder = myInbox.Folders("Extracted Mail")
Set myItem = myItems.Find("[SenderName] = 'sendername'")
While TypeName(myItem) <> "Nothing"
myItem.Move myDestFolder
Set myItem = myItems.FindNext
Wend
End Sub
thanks in advance
items into another outlook folder..
any pointers?
i've tried the following, yes it works but only for one
person, i need to move them all..
i also need to schedule this, how do i schedule a macro to
run, say every 10 mins?
Public Sub MoveMessages()
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNamespace("MAPI")
Set myInbox = myNameSpace.GetDefaultFolder(olFolderInbox)
Set myItems = myInbox.Items
Set myDestFolder = myInbox.Folders("Extracted Mail")
Set myItem = myItems.Find("[SenderName] = 'sendername'")
While TypeName(myItem) <> "Nothing"
myItem.Move myDestFolder
Set myItem = myItems.FindNext
Wend
End Sub
thanks in advance