DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   MS Access and FileMaker Pro (http://www.daniweb.com/forums/forum128.html)
-   -   Open a pdf in ms access (http://www.daniweb.com/forums/thread120383.html)

jasong911 Apr 22nd, 2008 4:48 am
Open a pdf in ms access
 
Hi how do i call a pdf file from a form in ms access please ?

shuff Apr 22nd, 2008 11:51 am
Re: Open a pdf in ms access
 
You don't say whether you want to call it from a menu or a button or something else, but whatever the mode, you'll want to do if from a macro attached to that mode.

In your form, create a button (for example) and for the OnClick property, call the macro macOpenPDF (for example). In the Action column, use "runapp" and for the command line argument, you must reference the path and filename to Adobe Acrobat (the application) and then, the path to the actual document you want to open. In my test form, here is my command line argument for the runapp action:

C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe c:\clc-drive.pdf

Save the macro and the form, then click that sucker and see it work! Of course, you can use this same method to open any document from any valid application, even text files in Notepad. But make sure your users will have the same applications at the same path destinations or the logic will fail.

Good luck- SLH

joe archer sr May 28th, 2008 11:27 am
Open a pdf in ms access 2003 using code to select pdf
 
this macro works fine..
but in my access 2003 application, i am able to save the reports in pdf format and then save them to c:\pdfreports\ *.pdf

i have up to 10 reports saved as pdf's in the directory.
what i want todo is to have the user open a combo box which contains the 10 reports in the above dir. when the click on the desired report i want the pdf to open with the selected one being opened..

as you know, the macro is not able to be changed to open the selected report.

there has got to be some code to allow me to input thcorrect selected pdf report into the command to be opened in the AcroRd32.exe can' use RUNAPP cause it's for macro's.
what can i do ??

thanks
joe archer sr san diego


All times are GMT -4. The time now is 4:51 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC