You need to sign in to do that
Don't have an account?
Apex coding
</body>
</html>
How to use Scripting.FileSystemObject(ActiveX object ) in salesforce
HI
Iam trying to read a file on my local machine using java script
Here Im using Scripting.FileSystemObject (ActiveX object)
Here I am getting an error like Automation server cannot create object
how to solve the issue. your help is greatly appreciated
Here is the code what I have used and help me in fixing the error
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<html>
<head>
<script type="text/javascript" src="/js/functions.js"></script>
<script src="/soap/ajax/12.0/connection.js"></script>
<script>
<script src="/soap/ajax/12.0/connection.js"></script>
<script>
function ReadFileToString(strFileName) {
var strContents;
strContents = "";
var strContents;
strContents = "";
objFSO = new ActiveXObject("Scripting.FileSystemObject");
if (objFSO.FileExists(strFileName)) {
strContents = objFSO.OpenTextFile(strFileName, 1).ReadAll();
}
document.getElementById('filestr').innerHTML = strContents;
if (objFSO.FileExists(strFileName)) {
strContents = objFSO.OpenTextFile(strFileName, 1).ReadAll();
}
document.getElementById('filestr').innerHTML = strContents;
} //end of function
</script>
</head>
</script>
</head>
<body onload=ReadFileToString('C:\createDocument.txt')>
<div id=filestr>
</div>
<div id=filestr>
</div>
</body>
</html>
regards
sunil