SaturnSeven
Programmer
I am trying to move emails from the Send Items folder of one account to a specific folder in another account.
I can loop through the emails I am trying to move OK, I can move them to a folder in the same account, but I can not figure out how to them to a different account.
How can this be done.
Any help / pointers would be greatly appreciated
Here's my code so far
' Set Variables
'Account 1
Dim ns As NameSpace
Dim SendItems As MAPIFolder
Dim Item As Object
Set ns = GetNamespace("MAPI")
Set SendItems = ns.GetDefaultFolder(olFolderSentMail)
'Account 2
Dim MoveTo As MAPIFolder
'Set MoveTo = ns.Folders("MoveTo")
'Loop
For Each Item In SendItems.Items
Debug.Print Item.Subject
'Item.Move MoveTo
Next
Set ns = Nothing
I can loop through the emails I am trying to move OK, I can move them to a folder in the same account, but I can not figure out how to them to a different account.
How can this be done.
Any help / pointers would be greatly appreciated
Here's my code so far
' Set Variables
'Account 1
Dim ns As NameSpace
Dim SendItems As MAPIFolder
Dim Item As Object
Set ns = GetNamespace("MAPI")
Set SendItems = ns.GetDefaultFolder(olFolderSentMail)
'Account 2
Dim MoveTo As MAPIFolder
'Set MoveTo = ns.Folders("MoveTo")
'Loop
For Each Item In SendItems.Items
Debug.Print Item.Subject
'Item.Move MoveTo
Next
Set ns = Nothing