'Add data to results string strResults = "Time: " & Date & " " & Time & vbCrLf & _ "Folder: " & strFolderPath & vbCrLf strResults = strResults & "File: " & strFile & vbCrLf If lngErrors <> 0 Then strResults = strResults & " Error " & lngErrors & " occurred. Abort." & vbCrLf End End If strResults = strResults & " Configuration changed for " & _ swView.Name & vbCrLf If strNoteTextOrig <> strNoteTextFinal Then strResults = strResults & _ " Note text replacement occurred" & vbCrLf If strNoteTextOrig <> strNoteTextFinal Then strResults = strResults & _ " Note text replacement occurred" & vbCrLf Sub PrintResults() 'File Scripting Object reference must be added Dim oFSO As FileSystemObject Set oFSO = New FileSystemObject 'Open the text file Dim oTextStream As TextStream Set oTextStream = oFSO.OpenTextFile(strFolderPath & "results.txt", 8, True) 'Write to the file oTextStream.WriteLine strResults 'Close the file and clean up oTextStream.Close Set oTextStream = Nothing Set oFSO = Nothing End Sub If strFolderPath <> "" Then _ Shell "notepad.exe " & strFolderPath & "results.txt", vbMaximizedFocus