Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro to save sent message to (2003)

    I would like to have a macro to automatize the option to save the sent message to a specific folder. A lot of my e-mails have to be recorded in a specific forlder and I hve to click option, go through the list of the folder and select the one that I want.
    I would like to be able to write a macro and assign it to a toolbar.
    Thank you for your help,
    Regards,
    Marcel

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Macro to save sent message to (2003)

    Edit. I think I misunderstood your question. Are you asking for a macro that always moves selected mesages to a specific Folder? You must edit this code to get the correct target folder.

    Sub MoveToMyTargetFolder()
    Dim selItems As Collection
    Dim objItem As Object
    Dim fldrTarg As MAPIFolder
    Dim lngC As Long

    Set selItems = New Collection
    ' you must match the following to the exact hierarchy of your target folder
    Set fldrTarg = Outlook.Session.Folders("Marcel").Folders("Inbox") .Folders("SubFolder").Folders("Target")

    If TypeName(Outlook.ActiveWindow) = "Explorer" Then
    For lngC = 1 To ActiveExplorer.Selection.Count
    selItems.Add Outlook.ActiveExplorer.Selection(lngC)
    Next lngC
    Else
    selItems.Add Outlook.ActiveInspector.CurrentItem
    End If

    For Each objItem In selItems
    With objItem
    Debug.Print TypeName(objItem)
    If .Class = olMail Then .Move fldrTarg
    End With
    Next objItem

    Set objItem = Nothing
    Set selItems = Nothing
    Set fldrTarg = Nothing
    End Sub

    This code will work with multiple messages in Folder View, or with the current open message. You will need to install the macro button manually.
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    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: Macro to save sent message to (2003)

    An alternative approach would be to set this before sending the message. You can do it manually under View>Options..., Save Sent message to, so it should be possible to do it with a toolbar that appears in your message composition window, at least as long as you are composing use the built-in Outlook editor/with Word your options probably look quite different. But John's "bulk move" approach might be more efficient if you mostly are going to move them to one folder.

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Macro to save sent message to (2003)

    Jefferson reminds me of another option; you can create Rule to send all messages to a Folder other than your Sent Folder, or you can create a rule to send all messages with certain attributes/words/etc. to a Folder other then your Sent Folder.
    -John ... I float in liquid gardens
    UTC -7ąDS

  5. #5
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to save sent message to (2003)

    This a way to do even if it is a copy of the message and not the message itself that is move in a specific folder.
    I have also find a different way by creating some draft with the specific folder setting up in the options, the subject of the draft is the name of the folder. Then I forward the draft and I change the subject.
    Regards,
    Marcel

  6. #6
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    195
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro to save sent message to (2003)

    I use this way also and the one explained in my answer to John
    Regards,
    Marcel

Posting Permissions

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