I am saving a txt file and I want it to open (execute) in excel after the script creates it.
I probably can't do it in JS and need to do a little doScript in VB and AS
Can anyone show me how to do this.
Something like
function openWith (myFile, myProgram) { if ($.os.match(/Mac/i)) app.doScript ("appleOpenWith (" + myFile + ", " + myProgram + ")", ScriptLanguage.APPLESCRIPT_LANGUAGE); else app.doScript ("windowsOpenWith (" + myFile + ", " + myProgram + ")", ScriptLanguage.VISUALBASIC); }
function appleOpenWith (myFile, myProgram) { \\ SOME APPLE SCRIPT HERE. WHAT???? }
function windowsOpenWith(myFile, myProgram) { \\ SOME VB HERE. WHAT???? }
Thanks
Trevor