It is said that there are no stupid questions, but I think I may demonstrate the error of that statement.
I am so not a programmer that I am embarrassed to even be posting to this site, but desperation has made me swallow my pride.
I am currently running a VBScript as part of an automation scheme sequentially executing Excel,
JS, and other routines.
I need to be able to define a variable in the VBS code that will be passed on to the
JS. Typically this would be a file path. I have tried the following (but of course it does not work):
VBS code
Code:
Dim MyServerSideVariable
MyServerSideVariable = "c:\\XXXX.csv"
Set wshShell = WScript.CreateObject ("WSCript.shell")
wshshell.run """list.js""", 6, True
set wshshell = nothing
JS code
Code:
var MyClientSideVariable = '<% =MyServerSideVariable%>';
var AB, AA;
var fso, f, f1, fc, s;
var filename;
/* create AB object */
AB = new ActiveXObject("Broker.Application");
AB.LoadDatabase("Z:\\QP database");
/* retrieve automatic analysis object */
AA = AB.Analysis;
/* load formula from external file */
AA.LoadFormula("Z:\\current list.afl");
/* run Explore*/
AA.Explore();
/* and display report */
AA.Export(MyClientSideVariable); /*<<THIS IS MY CONTRIBUTION*/
AB.quit();
Any help would be GREATLY appreciated!!!
Thanks in advance.
k