How to Batch Export the Details of Multiple Outlook Notes into a Plain Text File

Outlook allows you to save many notes into a plain text file, but this file will only contain the modified time of notes without the detailed note contents. So this post will show a piece of VBA code which can export notes’ details to a text file in bulk.

Perhaps you’ve discovered that Outlook default feature – “Save As” does not make a good job when saving multiple notes as one Plain Text file. It is because the text file will not include the elaborate contents of the note items. It’ll only contain the modified time. Most users aren’t satisfied with this effect. Hence, here we’ll show you another way that is using VBA.

Batch Export the Details of Multiple Outlook Notes into a Plain Text File

Batch Export the Details of Multiple Notes into a Plain Text File

  1. At the very beginning, start your Outlook application.
  2. Then press “Alt + F11” keys in the main Outlook window.
  3. Next in the subsequent Outlook VBA editor window, you need to open a new module.
  4. Subsequently, copy and paste the following VBA code into this module.
Sub ExportMultipleNotes_OnePlainTextFile()
    Dim objSelection As Outlook.Selection
    Dim objNote As Outlook.NoteItem
    Dim i As Long
    Dim strNotes As String
    Dim objShell As Object
    Dim objSavingFolder As Object
    Dim strSavingFolderPath As String
    Dim objFileSystem As Object
    Dim objTextFile As Object

    'Get the selected Outlook notes
    Set objSelection = Outlook.Application.ActiveExplorer.Selection
 
    On Error Resume Next
    i = 1
    For Each objNote In objSelection
        strNotes = strNotes & i & ": " & "Modified:" & vbTab & objNote.LastModificationTime & vbCrLf & vbCrLf & objNote.Body & vbCrLf & vbCrLf & "-------------------------------" & vbCrLf
        i = i + 1
    Next
 
    'Select a destination folder for saving the exported Text file
    Set objShell = CreateObject("Shell.Application")
    Set objSavingFolder = objShell.BrowseForFolder(0, "Select a destination folder:", 0, "")
    strSavingFolderPath = objSavingFolder.self.Path
 
    If strSavingFolderPath <> "" Then
       'Create a new Text file in the selected target folder
       Set objFileSystem = CreateObject("Scripting.FileSystemObject")
       Set objTextFile = objFileSystem.CreateTextFile(strSavingFolderPath & "\" & "Exported Notes-" & Format(Now, "yyyymmddhhmmss") & ".txt", True)
       objTextFile.WriteLine (strNotes)
 
       MsgBox "Exported " & i & " notes.", vbInformation + vbOKOnly
    End If
End Sub

VBA Code - Batch Export the Details of Multiple Outlook Notes into a Plain Text File

  1. After that, for later handy access, you had better add the new macro to Quick Access Toolbar.Add the new macro to Quick Access Toolbar
  2. Ultimately, you can turn to Outlook Notes pane to take a try.
  • Firstly, select the source notes which you want to export.
  • Then click the new macro button in Quick Access Toolbar.Select Notes & Run Macro
  • Next you’re demanded to select a destination local folder to save the new Plain Text file.Select a destination local folder
  • After macro completes, you will get a prompt like the picture below:Complete Message
  • Lastly, you can browse to the destination folder to find the new exported Plain Text file, which will look like the following screenshot:Exported Plain Text File

Get back Your Valuable Outlook Data

It is an unquestioned fact that Outlook is prone to damage. Hence, it is necessary to learn how to retrieve data in the event of serious Outlook crashes. In general, if you have backups, you can easily recover from backups. Also, utilizing Scanpst is worth a try. Plus, you can resort to a powerful external 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 fix and outlook repair software products. For more information visit www.datanumen.com