Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Aug 2004
    Posts
    361
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Save Sent Messages (XP)

    <P ID="edit" class=small>(Edited by kiazd on 16-Nov-06 20:57. Found some code in post 154,562)</P>Under Message Options you can change where Sent messages are saved. I'm wondering if there is a method to have a drop down menu, similar to Move to Folder option for received mail, which will allow users to select from a list as to where they want to save the sent message. This would eliminate the need to go to options and browse. Thanks.

    Edit. I know that there is the ability to copy the mail to a folder before it is sent, however I will have a copy in the folder of the recipient and the sent folder.

    The code at post 154,562 seems to be able to do what I want. However, not being familiar with Outlook vba I am not sure where the code should go. Under Project 1 there is ThisOutlookSession. I placed it there but when I run the code I get a message about Object required. Using de###### I find that the first Sub line is highlighted in yellow. Pressing F8 the If Item line is highlighted. F8 again brings up message and the Object Required box appears.

    Help would be greatly appreciated.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Save Sent Messages (XP)

    How many possible destinations are there? In other words, do you want to pop a list of all folders, or have a little menu with a specific (pre-determined) set?

  3. #3
    3 Star Lounger
    Join Date
    Aug 2004
    Posts
    361
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save Sent Messages (XP)

    A list of all folders will be the way to go. Thanks.

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Save Sent Messages (XP)

    Based on the code in <post#=154562>post 154562</post#>, and various miscellaneous experience, I've cobbled together this procedure for you:

    <code>Sub SetSaveTo()
    ' Only operate on a currently open, unsent mail message
    If Inspectors.Count = 0 Then Exit Sub
    With ActiveInspector.CurrentItem
    If (.Class <> olMail) Or (.Sent = True) Then Exit Sub
    End With
    ' Create object reference to current mail message
    Dim Item As Outlook.MailItem, fldSaveTo As Outlook.MAPIFolder
    Set Item = ActiveInspector.CurrentItem
    ' Display folder picker and set SaveTo folder in message
    Set fldSaveTo = Application.GetNamespace("MAPI").PickFolder
    If Not (fldSaveTo Is Nothing) Then
    Set Item.SaveSentMessageFolder = fldSaveTo
    Set fldSaveTo = Nothing
    End If
    If Not (Item Is Nothing) Then Set Item = Nothing
    End Sub</code>

    You can copy and paste that into one of your Outlook VBA code modules and then create a toolbar button for it inside a mail compose window. Considering that you only save one or two clicks, I'm not sure it's worth the effort, but that's your call. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    Added: Regarding where to paste the code, you might want to use Insert>Module to create a new code module. You can edit the name from Module1 to LoungeStuff (or whatever you like) to help keep it distinct from other modules you might accumulate.

  5. #5
    3 Star Lounger
    Join Date
    Aug 2004
    Posts
    361
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Save Sent Messages (XP)

    Thanks. I will work with this later. As for the number of clicks, you are right. However if there is a button on the bar that will let users have easier access.......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •