Hi all - I have a Windows client evaluating our payroll software, and we supply various PDF documents in a man subfolder, and generate a number of PDF output files (tax certificates etc)…but at this particular site it seems that f.launch (f being the PDF) doesn’t do anything - no error, just nothing.
This is the only site I’ve ever seen that doesn’t open a PDF in whatever viewer they use.
If I open the man folder and double-click the PDF document it opens fine in Adobe Reader (so it seems the default file association is set up correctly).
Perhaps this could be a profile security issue? Anyone encountered such weirdness (and hopefully a solution)?
Silly question… but are you sure the path information in “F” is 100% correct?
put a break at the Launch and examine it… it needs to be the FULL path to the document
Works in almost 100% of cases - this is the only time I’ve ever seen or heard of it not working (out of 1000’s of sites).
[code]Function HelpThepayprocess() As Boolean
dim f as FolderItem
if Develop() then
f=GetFolderItem(“man”).Child(“PDF”).Child(“Pay Process.pdf”)
else
f=GetFolderItem(“man”).Child(“Pay Process.pdf”)
end
if f.Exists then
f.Launch
else
MsgBox(“File not found”+EndOfLine+EndOfLine+“Sorry, the file Pay Process.pdf isn’t where it should be”+EndOfLine+EndOfLine+“Please visit the website for the latest documentation (Help…Website)”)
end
No idea - the site is in the Cook Islands, I’m in New Zealand. The price we sell a product for doesn’t permit writing a custom build and deploying it for a problem that exists on one machine and works flawlessly everywhere but there…I could log it in the next build but I’m pretty suspicious of the machine itself or a security or profile setting somewhere…so, it’ll take some time to get any in-depth info about f.lasterrorcode (good idea, I’ll log it)
[quote]If I open the man folder and double-click the PDF document it opens fine in Adobe Reader (so it seems the default file association is set up correctly).
[/quote]
I’m going to suggest they try it on a different machine - if the same thing happens then I’ll be sure that their security profile (or whatever) is affecting the app’s ability to launch a PDF (they’re on Windows 7 Service Pack 1 (Build 7601)) - and if that’s the case then I still don’t have a solution - maybe move them to our cloud edition (love XojoWE)
Have they run (or you remotely) the application as ADMIN? Maybe their security (as you say) prevents your app from launching the application from within. You could also try to shell to it, but you said creating a custom build is not an option.
Thanks Michel and Langue - the user is able to install the software, but we could try running it explicitly as Admin and see what happens. They’re installing a trial on a different machine to assess if it’s global at their site (then it’s security - it is a gov site…), otherwise just the original PC - and maybe reinstalling the reader will correct the problem (though as I’ve said already the association appears to work correctly - double-clicking the pdf itself opens OK in Adobe Reader - man I hate windows.
Hello guys, apparently I started to get same issue on the latest XOJO and on the latest build, I have 2 PDF’s both of them are opening fine in Preview if you double click on them, but when using .Launch one is opening, the other one does not , even if the file exists and it works well on the OS side, Xojo app side simply stops working .
[quote=476530:@Emile Schwarz]The command to use in the latest Xojo is FolderItem1.Open(True) (API2).
As RN said, FolderItem1.Launch is deprecated.[/quote]
Well deprecated but it still works on other files so I guess I’ll have to try 2.0 thanks for that.