If you would like to quickly convert multiple emails to .TXT files and then attach them in a new Outlook mail, you’d better utilize the way shared in this article. It can help you avoid the tedious steps.
By default, when you want to send multiple emails as attachments in a new mail, you can select all the source emails and then click “Forward” button. However, in this way, the source emails can be converted as .MSG attachments only. Therefore, if you wish to attach many emails as .TXT files in a new email, you can use the following means.
Attach Multiple Emails as .TXT Files to a New Email
- At the very outset, start your Outlook program.
- After that, in the main Outlook window, press “Alt + F11” key buttons.
- Subsequently, you can find that you have accessed the Outlook VBA editor, in which you have to open a blank module.
- Then you could copy the following VBA code into this module window.
Sub SendMultipleEmails_AsTXTAttachments() Dim objSelection As Outlook.Selection Dim objSourceMail As Outlook.MailItem Dim objNewMail As Outlook.MailItem Dim strFileName, strFilePath As String 'Get all selected emails Set objSelection = ActiveExplorer.Selection 'Create a new email Set objNewMail = Application.CreateItem(olMailItem) If Not (objSelection Is Nothing) Then For Each objSourceMail In objSelection strFileName = objSourceMail.Subject strFileName = Replace(strFileName, "/", " ") strFileName = Replace(strFileName, "\", " ") strFileName = Replace(strFileName, ":", "") strFileName = Replace(strFileName, "?", " ") strFileName = Replace(strFileName, Chr(34), " ") strFileName = Format(objSourceMail.ReceivedTime, "YYYY-MM-DD") & "_" & strFileName & ".txt" 'Save the selected emails as .TXT attachments strFilePath = "E:\" & strFileName objSourceMail.SaveAs strFilePath, OLTXT 'Attach the .TXT files to the new mail objNewMail.Attachments.Add strFilePath 'Delete the .TXT files Kill strFilePath Next End If 'Change the following details as per your needs With objNewMail .Subject = "Temp Mail" .Body = "This is a test mail." .To = "email@example.com" .Recipients.ResolveAll .Importance = olImportanceHigh .Display End With End Sub
- Next, for later easy convenience, you are better off adding this new macro to Quick Access Toolbar. You can exit the VBA editor and go to “Outlook Options” to achieve it.
- Later you should alter Outlook macro security level to low.
- Eventually, you can have a try.
- Firstly, select the emails which you want to send as .TXT attachments.
- Then click on the macro in the Quick Access Toolbar.
- At once, a new email, which contains the previously chosen mails as .TXT attachments, will display, like the screenshot below:
Combat against Outlook Corruption
Even though Outlook is feature rich, it still can become corrupted. Hence, users should make regular PST data backups and get hold of a well quality and reliable repair tool, like DataNumen Outlook Repair. It can repair PST file with minimized corruption in a jiffy.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including sql fix and outlook repair software products. For more information visit www.datanumen.com