C
Carrie
I'm having some trouble writing code to move the currently
selected e-mail to a specific destination folder (an Inbox
subfolder named "Vendor"). I can get the following code to
work, but obviously I still have to pick the destination
folder:
Set oInboxItems = bjNS.GetDefaultFolder
(olFolderInbox).Items
Set olns = Item.Application.GetNamespace("MAPI")
Set objTargetFolder = Outlook.Session.PickFolder
Set objCurItem = oInboxItems.Item(1)
objCurItem.Move objTargetFolder
If I set the specific destination folder nothing happens:
Set oInboxItems = objNS.GetDefaultFolder
(olFolderInbox).Items
Set olns = Item.Application.GetNamespace("MAPI")
Set objTargetFolder = objInbox.Folders("Vendor")
Set objCurItem = oInboxItems.Item(1)
objCurItem.Move objTargetFolder
What am I doing wrong? Thanks in advance for any
suggestions!
selected e-mail to a specific destination folder (an Inbox
subfolder named "Vendor"). I can get the following code to
work, but obviously I still have to pick the destination
folder:
Set oInboxItems = bjNS.GetDefaultFolder
(olFolderInbox).Items
Set olns = Item.Application.GetNamespace("MAPI")
Set objTargetFolder = Outlook.Session.PickFolder
Set objCurItem = oInboxItems.Item(1)
objCurItem.Move objTargetFolder
If I set the specific destination folder nothing happens:
Set oInboxItems = objNS.GetDefaultFolder
(olFolderInbox).Items
Set olns = Item.Application.GetNamespace("MAPI")
Set objTargetFolder = objInbox.Folders("Vendor")
Set objCurItem = oInboxItems.Item(1)
objCurItem.Move objTargetFolder
What am I doing wrong? Thanks in advance for any
suggestions!