The WriteToFile method writes data from a data object (such as a Dictionary object) into a specified stream in a structured storage file.
FileDocument.WriteToFile(FileName, Stream, Object)
The object must support the IPersistStream interface.
The specified stream must be in the root storage of the structured storage file.
The following Microsoft® Visual Basic® Scripting Edition (VBScript) example saves the contents of the Dictionary object called Dict
to the stream called myStream
of the specified file:
Set Dict = Server.CreateObject(“Commerce.Dictionary”)
Set FileDoc = Server.CreateObject(“Commerce.FileDocument”)
Dict(“MyOrder”) = “My Data”
Call fileDocument.WriteToFile(“C:\temp\test.txt”, "myStream", Dict)