>What's the exact code you're using to take that stringbuilder and put that string into a file?
' Save in a Xml fileIfNot oApp.CreateFileEncoding(loStringBuilder.ToString(), cFile, System.Text.Encoding.Unicode) Then
cMessage = oApp.StrTran(cCannotCreateFile, "##File##", cFile)
ReturnFalseEndIf