'-------------------------------------------------------------------------------
' WriteFileText - Used to write an item to a file in a folder.
' Parameters:
'   sFile - The file to read
'
' Returns:
'   A string containing the content of the file.
'-------------------------------------------------------------------------------
Function WriteFileText(sFilePath, sText)
    Dim objFSO 'As FileSystemObject
    Dim objTextFile 'As Object
   
    Const ForReading = 1
    Const ForWriting = 2
    Const ForAppending = 8
   
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objTextFile = objFSO.CreateTextFile(sFilePath, True)
   
    ' Write a line.
    objTextFile.Write (sText)

    objTextFile.Close
    'objTextFile.Close

End Function