Some users hope to batch import multiple Plain Text files into Outlook as separate note items. This post will look at this requirement to expose 2 methods to achieve it.
It is very easy to export the Outlook notes as Plain Text files via the simple “Save As” feature. Then, what about importing the Plain Text files as notes? There is not such a native function supporting such “Import”. Hence, here we will teach you 2 means to achieve it.
Method 1: Copy the Contents of Plain Text Files to Notes Manually
- First off, open a Plain Text file.
- Next, copy the contents in the text file.
- After that, create a new note in Outlook.
- Then, paste the contents of the text file into the note.
- Now, use this way to copy the contents of the other Plain Text files into notes.
Method 2: Batch Import Multiple Plain Text Files as Notes via VBA
- For a start, move the source Plain Text files into the same local folder.
- Then, start Outlook application.
- Next, trigger Outlook VBA editor according to “How to Run VBA Code in Your Outlook“.
- Subsequently, put the following VBA code into an unused module.
Sub BatchImportPlainTextFilesAsNotes() Dim strLocalFolder As String Dim objFileSystem As Object Dim objFolder As Object Dim objFile As Object Dim strFileExtension As String Dim objTextStream As Object Dim strText As String Dim objNote As Outlook.NoteItem 'Change to the folder containing the source plain text files strLocalFolder = "E:\Notes" Set objFileSystem = CreateObject("scripting.FileSystemObject") Set objFolder = objFileSystem.GetFolder(strLocalFolder) 'Import the text files as notes For Each objFile In objFolder.Files strFileExtension = objFileSystem.GetExtensionName(objFile) If strFileExtension = "txt" Then Set objTextStream = objFileSystem.OpenTextFile(objFile.Path) strText = objTextStream.ReadAll Set objNote = Outlook.Application.CreateItem(olNoteItem) objNote.Body = Left(objFileSystem.GetFileName(objFile), Len(objFileSystem.GetFileName(objFile)) - 4) & vbCrLf & vbCrLf & strText objNote.Save End If Next End Sub
- After that, tap on “F5” key button to run this macro.
- When macro finishes, go to the default “Notes” folder.
- There, you will see the new notes created from the Plain Text files, as shown in the following figure.
If Subject to Outlook Corruption
It is believed that multiple users have ever encountered some troubles in Outlook. Among those problems, the most cumbersome one is undoubtedly the seriously damaged Outlook data. Thereby, if you come across Outlook corruption, what will you do? You can firstly try the inbox repair tool. If it fails, you can proceed to take aid of a reliable and potent PST fix tool, such as DataNumen Outlook Repair.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including sql corruption and outlook repair software products. For more information visit www.datanumen.com