Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Leamington Spa, Warwickshire, England
    Posts
    136
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Get Outlook to Prompt to save message before sendi (Outlook 2007)

    I am sure way back in the old days of Office 95. I had a setting that prompted me before I sent the message if i wanted to save it. I only want to to save one or two messages so I have save turned off by default.

    I know I can go into the options ribbon and select it each time, but I and most other users forget.

    Any ideas?

    Regards

    Michelle

  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: Get Outlook to Prompt to save message before s

    You would get a prompt on every sent message - are you sure you want that?
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    2 Star Lounger
    Join Date
    Oct 2002
    Location
    Leamington Spa, Warwickshire, England
    Posts
    136
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Get Outlook to Prompt to save message before s

    Yes, we would want that as standard, along with spell check before you send

  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: Get Outlook to Prompt to save message before s

    I posted a procedure long ago that runs when the user clicks Send. In that case, it was to choose the outbound account to send on, but you can replace that with your own actions. See Prompt for Account (2003) (you will only need the general outline). This does need to be installed into every user's VbaProject.OTM, or distributed as a COM Add-in; it would take some work to deploy.

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

    Re: Get Outlook to Prompt to save message before s

    One of the problems in coding this is that if an item is sent and not saved to the Sent folder, it cannot be operated on. Therefore we are going to do things a little bit backwards; we are going to make the call to keep or delete the item after it has been sent. Therefore, in Outlook 2003 under Tools | Options | Email Options, check the "Save copies of Sent messages in Sent Folder" (yes, the opposite of what you have now).

    In the Outlook Visual Basic Editor, post this code into the "ThisOutlookSession" module:

    Option Explicit

    Public WithEvents itmsSentMessages As Outlook.Items

    Private Sub Application_Startup()
    Set itmsSentMessages = Outlook.Session.GetDefaultFolder(olFolderSentMail) .Items
    End Sub

    Private Sub Application_Quit()
    Set itmsSentMessages = Nothing
    End Sub

    Private Sub itmsSentMessages_ItemAdd(ByVal Item As Object)
    <font color=red>Dim strEntryID As String, strStoreID As String
    Dim objCDOSession As Object</font color=red>

    If Item.Class <> olMail Then Exit Sub
    <font color=blue>If MsgBox("Keep this message: " & Item.Subject & "?", vbYesNo + vbDefaultButton2, "Keep Message?") = vbNo Then Item.Delete</font color=blue>
    <font color=red>If MsgBox("Keep this message: " & Item.Subject & "?", vbYesNo + vbDefaultButton2, "Keep Message?") = vbNo Then
    strEntryID = Item.EntryID
    strStoreID = Item.Parent.StoreID
    Set objCDOSession = CreateObject("MAPI.Session")
    objCDOSession.Logon "", "", False, False
    objCDOSession.GetMessage(strEntryID, strStoreID).Delete
    objCDOSession.Logoff
    Set objCDOSession = Nothing
    End If</font color=red>
    End Sub

    If you prefer to send the unwanted message to the Deleted Items Folder, delete the red lines of code. If you prefer to never again see the unwanted message, delete the blue line of code. Don't leave both red and blue lines in your final code! You must close and restart Outlook for the code to "hook" and become active. This technique is somewhat related to Jefferson's code, but based more on <post#=402,534>post 402,534</post#> to which he also contributed significantly. Post back if you have problems with it.

    Spell check should happen automatically on Send if you check which ever Tools | Options | Spelling boxes you want. If for some reason it isn't working, you can use the following code in the same "ThisOutlookSession" module mentioned above.

    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    ' forced spellcheck
    ActiveInspector.CommandBars.FindControl(ID:=2).Exe cute
    End Sub
    -John ... I float in liquid gardens
    UTC -7ąDS

Posting Permissions

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