code_junkie

How to move mails from one linked Exchange mailbox to another in MS Access

Nov 11th, 2011
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. Set oApp = CreateObject("Outlook.Application")
  2.  
  3. Set oNS = oApp.GetNamespace("MAPI")
  4.  
  5. Set oMailItems = oNS.GetDefaultFolder(olFolderInbox)
  6. Set itm = oMailItems.Items(6)
  7. itm.Move oNS.GetDefaultFolder(olFolderDeletedItems)
Add Comment
Please, Sign In to add comment