Jul 6, 2005 #1 scoobypaw Technical User Jun 8, 2005 20 US Hello Is there a way to create a PDF of a report through a command button ? If so, does anyone know how I would write the code ? Thanks
Hello Is there a way to create a PDF of a report through a command button ? If so, does anyone know how I would write the code ? Thanks
Jul 6, 2005 #2 misscrf Technical User Jun 7, 2004 1,344 US I wouldnt mind an answer to this either. Here is what I think is involved: 1) create a funtion (or sub) that will have Application.Printer = Application.Printers(PDF995) docmd.printout acprintall if you have a different pdf printer name, then replace PDF995 with that. 2) create a macro, and have it runcode - that code if you created 1 as a sub you will have to create a function to call that sub. 3) in the report design, check the box for the toolbar - printpreview - then add a custom button, name it soemthing good, and assign that macro to it. Good luck and let me know if this works for you. misscrf It is never too late to become what you could have been ~ George Eliot Upvote 0 Downvote
I wouldnt mind an answer to this either. Here is what I think is involved: 1) create a funtion (or sub) that will have Application.Printer = Application.Printers(PDF995) docmd.printout acprintall if you have a different pdf printer name, then replace PDF995 with that. 2) create a macro, and have it runcode - that code if you created 1 as a sub you will have to create a function to call that sub. 3) in the report design, check the box for the toolbar - printpreview - then add a custom button, name it soemthing good, and assign that macro to it. Good luck and let me know if this works for you. misscrf It is never too late to become what you could have been ~ George Eliot