Maybe you’ve created several draft emails and hope to reuse them many times. If so, why don’t you batch save them as Outlook templates? This article will teach you to accomplish it in one go via VBA.
By default, Outlook only permits users to save a single email as template at once. In other words, you cannot save multiple draft emails as templates in bulk. As you can see, when you select more than one mail and go to “File” > “Save As”, you cannot find the “Outlook Template” format in “Save as type” list, only “Text Only” available. But, we will introduce you how to bulk realize it in the followings.
Batch Save Multiple Draft Emails as Outlook Templates
- At the very outset, trigger Outlook VBA editor.
- In the new “Microsoft Visual Basic for Applications” window, copy and paste the VBA code below.
Sub SaveMultipleDraftsAsTemplates() Dim objSelection As Outlook.Selection Dim i As Long Dim strTemplateFolder As String Dim objMail As Outlook.MailItem Dim strSubject As String 'Get all selected mails Set objSelection = Outlook.Application.ActiveExplorer.Selection If Not (objSelection Is Nothing) Then 'Get the default folder for saving Outlook Templates strTemplateFolder = CStr(Environ("USERPROFILE")) & "\Documents\UserTemplates\" 'Save each mail as template For i = objSelection.Count To 1 Step -1 If objSelection(i).Class = olMail Then Set objMail = objSelection(i) If objMail.Subject <> "" Then 'Remove unsupported characters strSubject = objMail.Subject strSubject = Replace(strSubject, "/", " ") strSubject = Replace(strSubject, "\", " ") strSubject = Replace(strSubject, ":", "") strSubject = Replace(strSubject, "?", " ") strSubject = Replace(strSubject, Chr(34), " ") objMail.SaveAs strTemplateFolder & strSubject & ".oft", olTemplate Else objMail.SaveAs strTemplateFolder & "Template" & i & ".oft", olTemplate End If End If Next 'Open the folder of Templates Shell "Explorer.exe" & " " & strTemplateFolder, vbNormalFocus End If End Sub
- After that, for later convenience, it is suggested to attach this macro to Quick Access Toolbar (QAT). About detailed steps, you can read “How to Run VBA Code in Your Outlook“
- Ultimately, you can take a shot by following the operations below.
- At first, select the draft emails to be saved as templates.
- Then, click the macro button in the QAT.
- When macro finishes, the Windows folder for saving the default Outlook templates will display. You can see that the templates from the selected draft emails are over there.
Inbox Repair Tool Still Can Fail
When it comes to the internal Outlook fix tool – Scanpst, a great number of users will appreciate it. Undoubtedly, this utility is indeed capable of resolving majority of small issues in Outlook. Yet, it isn’t totally flawless. It still can fail and bring up many errors. For example, in the event of severe Outlook corruption, it is unable to repair the compromised PST file. In that scenario, you have no alaternative but to use a mightier and tip-top third party tool, such as DataNumen Outlook Repair.
Author Introduction:
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including sql recovery and outlook repair software products. For more information visit www.datanumen.com