Usenet.com

www.Usenet.com

Group Index

Sci Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Create file over the network



I have an html page, which provides a button. When the button is
clicked, a function (see code below) is called to create an excel file
on my machine (e.g. under root of c: drive).

The html page works fine on my local but when I put it on another
machine on a network, and when I loaded up the html page from that
machine and clicked on the button (which means I want the html page to
write an excel file on my local c: drive, there was a popup window
(titled "Internet Explorer Script Error") showing an error message:
ActiveX component can't create object:'Scripting.FileSystemObject'.

I'm not sure if this is because of the network writing authority issue
or something else. Can somebody please give some suggestions? The code
of my functions are attached:

-------------------------------------------------------------------
<script language="vbscript">

Sub  CommandButton1_click()
     call CreateExcel
End Sub

Function createExcel()
   Const ForReading=1, ForWriting=2, ForAppending=8
   Dim  fso,act
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set act = fso.OpenTextFile("c:/Submit.xls",ForWriting,True)
   act.WriteLine "FamilyName" &  "      "   & "FirstName"
   act.WriteLine frmCPP.FamilyName.value &  "   "   &
frmCPP.FirstName.value
End Function
</script>
---------------------------------------------------------------------



<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.