MAPI Sent Items 
Author Message
 MAPI Sent Items

Hi All,
I'm trying to set up my MAPI session so that all messages that I send
are not saved in the "Sent Items" folder.  Is it possible to do this
programmatically using VB?
Thanks in advance,
Iain


Wed, 18 Jun 1902 08:00:00 GMT  
 MAPI Sent Items
Absolutely. Couldn't tell you off the top of my head, but if you have the
MSDN library I know there is an example that does exactly what you are
trying to do. It shows you how to move items from one folder to the next.
Here's how I did it in VB with outlook where I was moving items from one
folder to another. You can do this same thing with CDO.

Public Sub processEmails()

'Set the current folder to Inbox and return moFolder as inbox
Set moExplorer.CurrentFolder = moNamespace.GetDefaultFolder(olFolderInbox)
Set moFolder = moNamespace.GetDefaultFolder(olFolderInbox)
Set moFolder2 = moFolder.Folders("OtherFolder")
'Note that the Other folder is a subset of the Inbox folder. But you should
get the idea. . .

'Iterate through each e-mail in inbox. move it to OtherFolder
For Each moItem In moFolder.Items
        moItem.Move moFolder2
Next moItem

End Sub

Hope this helps.

John Downing

www.pearls-etc.com


Quote:
> Hi All,
> I'm trying to set up my MAPI session so that all messages that I send
> are not saved in the "Sent Items" folder.  Is it possible to do this
> programmatically using VB?
> Thanks in advance,
> Iain



Sun, 23 Mar 2003 09:01:14 GMT  
 MAPI Sent Items
Thanks John.



Quote:
>Absolutely. Couldn't tell you off the top of my head, but if you have the
>MSDN library I know there is an example that does exactly what you are
>trying to do. It shows you how to move items from one folder to the next.
>Here's how I did it in VB with outlook where I was moving items from one
>folder to another. You can do this same thing with CDO.

>Public Sub processEmails()

>'Set the current folder to Inbox and return moFolder as inbox
>Set moExplorer.CurrentFolder = moNamespace.GetDefaultFolder(olFolderInbox)
>Set moFolder = moNamespace.GetDefaultFolder(olFolderInbox)
>Set moFolder2 = moFolder.Folders("OtherFolder")
>'Note that the Other folder is a subset of the Inbox folder. But you should
>get the idea. . .

>'Iterate through each e-mail in inbox. move it to OtherFolder
>For Each moItem In moFolder.Items
>        moItem.Move moFolder2
>Next moItem

>End Sub

>Hope this helps.

>John Downing

>www.pearls-etc.com



>> Hi All,
>> I'm trying to set up my MAPI session so that all messages that I send
>> are not saved in the "Sent Items" folder.  Is it possible to do this
>> programmatically using VB?
>> Thanks in advance,
>> Iain



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. MAPI Sent Items

2. MAPI Sent Items

3. MAPI access to Sent Items folder???

4. MAPI and Sent Items

5. Mapi: Send method will not send

6. MAPI message Send method puts message in Outbox but it isn't actually sent

7. Programmatically delete an item from the Sent items

8. Programmatically delete an item from the Sent Items Folder

9. Howto trap MAPIFolder.Items.ItemAdd on Sent Items Folder

10. How to delete selective items from Sent Items from PF Script

11. Meeting item when sent as item gives problems

12. Removal of attachments on email items in Sent items folder

 

 
Powered by phpBB® Forum Software