Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or
0
0
0
s2smodern

How to save multiple selected emails as MSG files in bulk in Outlook?

It is easy to save an email as a MSG file in Outlook. How can you save multiple selected emails as individual MSG files in bulk in Outlook? This article will show you a method to achieve it.

Save multiple selected emails as MSG files with VBA code


Easily save selected emails as different format files in Outlook:

With the Save as File utility of Kutools for Outlook, you can easily save multiple selected emailsas individual HTML format file, TXT format file, Word document, CSV file as well as PDF file in Outlook as below screenshot showed.

Kutools for Outlook: with more than 40 handy Outlook add-ins, free to try with no limitation in 45 days. Download and free trial Now!


Save multiple selected emails as MSG files with VBA code

The following VBA code can help you save multiple selected emails as individual MSG files in bulk in Outlook. Please do as follows.

1. Select the emails you want to save as MSG files. Then press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.

2. In the Microsoft Visual Basic for Applications window, click Insert > Module, and then copy below VBA code into the Module window.

VBA code: Save multiple selected emails as individual MSG files in Outlook

Public Sub SaveMessageAsMsg()
'Update by Extendoffice 2018/3/5
Dim xMail As Outlook.MailItem
Dim xObjItem As Object
Dim xPath As String
Dim xDtDate As Date
Dim xName, xFileName As String
On Error Resume Next
Set xShell = CreateObject("Shell.Application")
Set xFolder = xShell.BrowseForFolder(0, "Select a folder:", 0, strStartingFolder)
If Not TypeName(xFolder) = "Nothing" Then
    Set xFolderItem = xFolder.self
    xFileName = xFolderItem.Path & "\"
Else
    xFileName = ""
    Exit Sub
End If
For Each xObjItem In Outlook.ActiveExplorer.Selection
    If xObjItem.Class = olMail Then
        Set xMail = xObjItem
        xName = xMail.Subject
        xDtDate = xMail.ReceivedTime
        xName = Format(xDtDate, "yyyymmdd", vbUseSystemDayOfWeek, _
          vbUseSystem) & Format(xDtDate, "-hhnnss", _
          vbUseSystemDayOfWeek, vbUseSystem) & "-" & xName & ".msg"
        xPath = xFileName + xName
        xMail.SaveAs xPath, olMSG
    End If
Next
End Sub

3. Press the F5 key to run the code.

4. In the Browse For Folder dialog box, please specify a folder to save the MSG files and then click the OK button. See screenshot:

Now all selected emails are saved as individual MSG files as below screenshot shown.


100+ Powerful Tools and Features for Outlook 2010 / 2013 / 2016 / 2019 / Office 365:

li-orangeCompatible with Outlook 2010 / 2013 / 2016 / 2019 / Office 365 (32/64);

li-orangeCompatible with Windows XP, Windows Vista, Windows 7 / 8 / 10, Windows Server 2003/2008, Citrix System and Windows Terminal (Remote Desktop) Server;

li-orangeFree trial without feature limitation in 45 days!

READ MORE | FREE DOWNLOAD | BUY NOW

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.