Skip to main content

Kutools for Office β€” One Suite. Five Tools. Get More Done.

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

Author Siluvia Last modified

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


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:

the screenshot of step 1 about saving selected emails as msg files using vba in outlook

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

the screenshot of step 2 about saving selected emails as msg files using vba in outlook

Easily save selected emails as different format files in Outlook:

With the "Bulk Save" 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. Download the free version of Kutools for Outlook now! 

ad about saving emails as multiple file formats in outlook with kutools for outlook


Best Office Productivity Tools

Breaking News: Kutools for Outlook Launches Free Version!

Experience the all-new Kutools for Outlook with 100+ incredible features! Click to download now!

πŸ€– Kutools AI : Uses advanced AI technology to handle emails effortlessly, including replying, summarizing, optimizing, extending, translating, and composing emails.

πŸ“§ Email Automation: Auto Reply (Available for POP and IMAP)  /  Schedule Send Emails  /  Auto CC/BCC by Rules When Sending Email  /  Auto Forward (Advanced Rules)   /  Auto Add Greeting   /  Automatically Split Multi-Recipient Emails into Individual Messages ...

πŸ“¨ Email Management: Recall Emails  /  Block Scam Emails by Subjects and Others  /  Delete Duplicate Emails  /  Advanced Search  /  Consolidate Folders ...

πŸ“ Attachments ProBatch Save  /  Batch Detach  /  Batch Compress  /  Auto Save   /  Auto Detach  /  Auto Compress ...

🌟 Interface Magic: 😊More Pretty and Cool Emojis   /  Remind you when important emails come  /  Minimize Outlook Instead of Closing ...

πŸ‘ One-click Wonders: Reply All with Attachments  /   Anti-Phishing Emails  /  πŸ•˜Show Sender's Time Zone ...

πŸ‘©πŸΌβ€πŸ€β€πŸ‘©πŸ» Contacts & Calendar: Batch Add Contacts From Selected Emails  /  Split a Contact Group to Individual Groups  /  Remove Birthday Reminders ...

Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Instantly unlock Kutools for Outlook with a single click. Don't wait, download now and boost your efficiency!

kutools for outlook features1 kutools for outlook features2

πŸš€ One-Click Download β€” Get All Office Add-ins

Strongly Recommended: Kutools for Office (5-in-1)

One click to download five installers at once β€” Kutools for Excel, Outlook, Word, PowerPoint and Office Tab Pro. Click to download now!

  • βœ… One-click convenience: Download all five setup packages in a single action.
  • πŸš€ Ready for any Office task: Install the add-ins you need, when you need them.
  • 🧰 Included: Kutools for Excel / Kutools for Outlook / Kutools for Word / Office Tab Pro / Kutools for PowerPoint