Hey guys,
why is:
Shell.Execute(SessionVar.Expand("C:\\Program Files\\Adobe\Reader 9.0\\Reader\\AcroRd32.exe"), "open", "/A page=15 bla.Pdf", "", SW_SHOWNORMAL);
not working?!
the Adobe Reader is in this path...
thanks for help
Professional Software Development Tools
Hey guys,
why is:
Shell.Execute(SessionVar.Expand("C:\\Program Files\\Adobe\Reader 9.0\\Reader\\AcroRd32.exe"), "open", "/A page=15 bla.Pdf", "", SW_SHOWNORMAL);
not working?!
the Adobe Reader is in this path...
thanks for help
hm ok,
what would be the correct Sessionvar?
thanks
You should retrieve the correct handler for PDF files from the registry. This way, you would have the proper syntax, as well as the path to the application, which depends on the version and language of the operating system.
Ulrich
ShadowUK pointed out the main flaw with the exact code:
Adobe\Reader should be Adobe\\Reader
as ulrich pointed out; you have an underlaying problem with portability of your code. you should use the system to fetch the pdf handler (not everyone may have that exact version of acrobat installed, indeed, not everyone even has acrobat...)
Code:lcPDF = File.GetDefaultViewer("PDF"); if lcPDF and File.DoesExist( lcPDF ) then File.Run( lcPDF, "/A page=15 bla.Pdf"); else Dialog.Message("Error","No handler for PDF's") end
(Click here to contact me)
Providing Independent Professional Consulting Services for
IndigoRose products, World Wide.
Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)