Is the following command correct to open a file on the desktop of a windows 10 computer?
Lianja.showDocument("file:///%userprofile%\Desktop\bounder_brochure.pdf")
Is the following command correct to open a file on the desktop of a windows 10 computer?
Lianja.showDocument("file:///%userprofile%\Desktop\bounder_brochure.pdf")
I am not sure you can use %USERPROFILE% here.
You can get the value of that environment variable with GETENV('USERPROFILE') and maybe construct it
Last edited by josipradnik; 2022-10-12 at 04:22.
Code:Lianja.showDocument("file:///"+getenv("USERPROFILE")+"\Desktop\bounder_brochure.pdf")
Something like this:
Code:yourfile="bounder_brochure.pdf" usrprof=getenv('USERPROFILE') ?usrprof zzz=usrprof+"\Desktop\"+yourfile ?zzz Lianja.showDocument("file:"+zzz)
Bookmarks