Hi all
This following line is generated from a ASP file but when ever you click on it you get a "type mismatch error". File_Open is a function from the MSDN site, the code works fine with a hard coded file name but since I have changed it to a function I get errors.
<a href="#" onclick="vbscript:File_Open('_148074869_TEST.doc')" >test</a>
<%
Function File_Open(docref)
Response.buffer = TRUE
Response.ContentType = "application/msword"
Dim vntStream
Set oMyObject = Server.CreateObject("MyObject.BinRead"
vntStream = oMyObject.readBinFile("D:\Data\document_references\" & docref)
Response.BinaryWrite(vntStream)
Set oMyObject = Nothing
Response.End
End Function
%>
Thanks in advance
Jon
This following line is generated from a ASP file but when ever you click on it you get a "type mismatch error". File_Open is a function from the MSDN site, the code works fine with a hard coded file name but since I have changed it to a function I get errors.
<a href="#" onclick="vbscript:File_Open('_148074869_TEST.doc')" >test</a>
<%
Function File_Open(docref)
Response.buffer = TRUE
Response.ContentType = "application/msword"
Dim vntStream
Set oMyObject = Server.CreateObject("MyObject.BinRead"
vntStream = oMyObject.readBinFile("D:\Data\document_references\" & docref)
Response.BinaryWrite(vntStream)
Set oMyObject = Nothing
Response.End
End Function
%>
Thanks in advance
Jon