Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

FAQ.How to open PDF in acrobat reader?
Answer: Try this code:
dim pdf as FolderItem = SpecialFolder.Desktop.Child("test.pdf")

// open PDF in Acrobat Reader on Mac:

// find app
dim bundleID as string = "com.adobe.Reader"
dim app as FolderItem = LaunchServicesFindApplicationForInfoMBS("", bundleID, "")

if app<>nil then

// launch app with parameters

dim docs() as FolderItem
docs.Append pdf

dim param as new LaunchServicesLaunchParameterMBS
param.Defaults = true
param.Application = app

dim x as FolderItem = LaunchServicesOpenXMBS(docs, param)

// on failure, simply launch it
if x = nil then
end if

end if
Notes: On Windows, simply use pdf.launch or WindowsShellExecuteMBS.

Feedback, Comments & Corrections

MBS Xojo Plugins