I need to save a text file in Excel VBA without the Byte Order Marker (BOM). I am aware of different solutions to this problem, such as the one given here Can I export excel data with UTF-8 without BOM?
However, the file I need to save is rather large and it seems to be significantly faster to save it using the following code:
Set fso = CreateObject("Scripting.FileSystemObject")
Set oFile = fso.CreateTextFile("File.txt")
oFile.WriteLine StringToSaveInFile
oFile.Close
instead of using adodb.stream, as done in the example in the link. Unfortunately, using the code above includes the BOM, does anyone know of a method in VBA for removing the BOM without using adodb.stream?