I recently started new project at work where I would like to work a bit with JavaScript. It's my first contact with JS and I am already struggling with one reference.
I am trying to open an workbook (Excel) using JS, but it's secured by password. I don't know what is proper syntax to pass optional objects such as "Password:=***". Here is what I have:
function test() {
    var Excel = new ActiveXObject("Excel.Application");
    var Location = "W:/MyFolder/MyFile.xlsm"
    Excel.Visible = true;
    var obj = Excel.Workbooks.Open(Location:="****");
}
It works fine, it opens the file as intended however I can't add password variable - for example:
var obj = Excel.Workbooks.Open(Location, Password:="****");
Any ideas?
 
     
     
    