Function ReadAllText(ByVal filename As String) As String
Set FSOObj = CreateObject("scripting.filesystemobject")
Set ts = FSOObj.OpenTextFile(filename, 1, True): ReadAllText = ts.ReadAll: ts.Close
Set ts = Nothing: Set FSOObj = Nothing
End Function
Function WriteAllText(ByVal filename As String, ByVal txt As String) As Boolean
On Error Resume Next: Err.Clear
Set FSOObj = CreateObject("scripting.filesystemobject")
Set ts = FSOObj.CreateTextFile(filename, True)
ts.Write txt: ts.Close
WriteAllText = Err = 0
Set ts = Nothing: Set FSOObj = Nothing
End Function