function GetDoc() as string return filetostr('c:\test.doc') endfunctionasp:
<% response.contentType="application/msword" set ox = server.CreateObject("test.test") response.BinaryWrite(ox.GetDoc()) %>if I user BinaryWrite(), I get like unicode or something. Every byte has an extra 00 in front of it. If I use Write() it cuts off the document at the first offending character (probably a null). MSWord will not open the resulting file in either case.