Link to home
Start Free TrialLog in
Avatar of sbatada
sbatada

asked on

Open a pdf file from a local drive using Adobe Acrobat Reader using OLE object.

Hi,

We are using the Brio reporting software and I have a command button which when clicked will tell Brio to export the report in pdf format to the c drive. I can use the Application.Shell(App, Agrs) method to open Adobe Acrobat Reader and the saved pdf file from the C drive. Hoever this requires me to hard code the path to the AcroRd32.exe and this is a problem as different users may have different Adobe Reader versions. Thus I am trying to open Acrobat Reader using OLE object and am able to open it using the following two commands :
adobe = new OLEObject("AcroExch.App");
adobe.Show;

However I am unable to tell it to get the test .pdf file form C:\Test.Pdf and display it.

Can anybody please tell me how I can do this.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of vinnyd79
vinnyd79

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 4ceReconSniper
4ceReconSniper

yeah that is the same way i did and i agree to his solution, but the acrobat.exe is left in the processes bar on yout task manager, ask vinnyd79 how to close it
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial