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")
Printable View
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
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)