A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

automated filing of sent items



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 11th 08, 11:01 AM posted to microsoft.public.outlook.program_vba
Excelerate-nl
external usenet poster
 
Posts: 3
Default automated filing of sent items

I am looking for a macro/form that will pop-up after sending a mail, asking
for where to store the sent mail. I have several sub-directories in my own
mailbox as well as other mailboxes. The menu should give a dropdown box with
the option to select the sub-directory where to store the sent mail.

Thanks for your reply,

Jan Bart
Ads
  #2  
Old September 11th 08, 07:25 PM posted to microsoft.public.outlook.program_vba
JP[_3_]
external usenet poster
 
Posts: 201
Default automated filing of sent items

Check out the Application_ItemSend Event, which is perfect for setting
this option. For example:

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
Boolean)

Dim olApp As Application
Dim objNS As NameSpace
Dim objFolder As MAPIFolder
Dim Msg As MailItem

Set olApp = Application
Set objNS = olApp.GetNamespace("MAPI")
Set objFolder = objNS.Folders("Mailbox - My Public Inbox
Folder").Folders("Sent Items")
Set Msg = Item

Set Msg.SaveSentMessageFolder = objFolder


Set Msg = Nothing
Set objFolder = Nothing
Set objNS = Nothing
Set olApp = Nothing
End If

All you need to is change the code to prompt the user for the folder,
using the Pickfolder method to return a MAPIFolder Object.

HTH,
JP

On Sep 11, 5:01*am, Excelerate-nl
wrote:
I am looking for a macro/form that will pop-up after sending a mail, asking
for where to store the sent mail. I have several sub-directories in my own
mailbox as well as other mailboxes. The menu should give a dropdown box with
the option to select the sub-directory where to store the sent mail.

Thanks for your reply,

Jan Bart


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Filing missing AndersonTaxi Outlook - Installation 1 May 23rd 08 04:34 AM
Automated creation of links to Outlook items Fil Outlook and VBA 0 February 12th 08 01:08 PM
Name and filing options Jon Erlendsson Outlook - Using Contacts 3 January 23rd 07 12:13 PM
filing the reply to a message in sent items Sharad Outlook - Installation 1 December 12th 06 03:47 AM
Contacts not filing correctly probcdc Outlook - Using Contacts 7 September 20th 06 09:36 PM


All times are GMT +1. The time now is 08:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.