Public Function WriteFile(ByVal Filename As String, ByVal Contents As String, Optional ByVal CreatePath As Boolean = False, Optional ByVal WriteBinary As Boolean = True) As String
Writes a file in the file system. Overwrites if existing.
lErrorMessage = WriteFile("C:\Temp\MyFolder\MyFile.txt", "Hello world", True)