How to set default file format for saving emails in Outlook 2003

Posted on 2007-10-19
Last Modified: 2008-01-09
In Outlook 2003, when you go to "save as" to save an email, the file format defaults to the format of that email. For example if its HTML then it gives you HTML, if it's text then you get text etc.

Can aybody tell me if it is possible to get it to default to Outlook Message Format??
Question by:metamatic
    LVL 11

    Expert Comment

    Hi - I really like the .msg format that you're trying to default saved emails to, but I have not found a way to set that default in the Save As window.

    I have found that if you drag an email from Outlook to your desktop, it automatically saves in the .msg format, and that method also works if you're dragging emails to a windows folder.  That's the way I've gotten around this one.
    LVL 97

    Expert Comment

    Hello metamatic,

    No, you cannot change the default message format in Oultook when saving.

    By Outlook Message Format, do you mean Outlook HTML format?

    Hope this helps!
    LVL 76

    Expert Comment

    by:David Lee
    Hi, metamatic.

    war1 is correct, there is no setting for controlling the default.  We can work around that though if a script based solution is an option.  Via scripting the save operation we can control the format the items are saved in.  But, there are a couple of downsides to a scripted solution.  One, it means saving in a different fashion.  In other words, users won't click File -> Save as.  Instead they'd click a toolbar button.  The positive side of this is that saving is faster.  Two, Outlook's built-in security is going to display a warning message each time an item is saved.  Let me know if you want to pursue this and I'll post the code and instructions for using it.

    Author Comment

    Thanks for the replies and apologies for the delay in replying.

    I woud quite like to try out the scripted option so would be grateful if you code post the code and instructions.

    Expert Comment

    I, also would be interested in seeing your code.  I wrote somethng in VBA and had a lot of issues with characters that are acceptable in the subject, but not so in a file name.  Just wondering how it was handled.

    Metamatic,  I can share this code with you if you have not heard back from BlueDevilFan.
    LVL 76

    Accepted Solution

    metamatic & ekscheaffer,

    Apologies for not having posted back to this question sooner.  Unfortunately I lose track of a few questions and this was one of them, until ekscheaffer's post.  The code below is what I'd use for doing this.  Right now it saves everything to a single folder, but it could be modified to allow the user to choose the folder.

    The ReplaceIllegalCharacters function removes all the characters that can be in a subject but are not allowed in a filename.  
    Sub SaveFile()
        'Replace the path on the following line with your path
        Const SAVE_TO_PATH = "C:\Some Folder\"
        Dim strFilename As String, _
            olkItem As Outlook.MailItem
        For Each olkItem In Application.ActiveExplorer.Selection
            strFilename = SAVE_TO_PATH & ReplaceIllegalCharacters(olkItem.Subject) & ".msg"
            olkItem.SaveAs strFilename, olMSG
        Set olkItem = Nothing
    End Sub
    Function ReplaceIllegalCharacters(strSubject As String) As String
        Dim strBuffer As String
        strBuffer = Replace(strSubject, ":", "")
        strBuffer = Replace(strBuffer, "\", "")
        strBuffer = Replace(strBuffer, "/", "")
        strBuffer = Replace(strBuffer, "?", "")
        strBuffer = Replace(strBuffer, Chr(34), "'")
        strBuffer = Replace(strBuffer, "|", "")
        ReplaceIllegalCharacters = strBuffer
    End Function

    Open in new window


    Expert Comment


    That is similar to how I was doing it, except that I stored the illegal characters in an array, and used a For Each statement to loop through them.  Your way seems more efficient!  Thankx for posting the code.
    LVL 76

    Expert Comment

    by:David Lee
    I don't know that my approach is any more efficient.  The important point is having a routine to remove the illegal characters.

    Author Comment

    Many thanks
    LVL 76

    Expert Comment

    by:David Lee
    You're welcome.  Glad I could help.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
    Use email signature images to promote corporate certifications and industry awards.
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now