Link to home
Start Free TrialLog in
Avatar of TerenceHewett
TerenceHewett

asked on

printing powerpoint in access 2003 using VBA

Hi experts,

I would like to print a powerpoint presentation, excel file and a pdf file direct to the printer using a command button on a form.  I have been able to do this for Word, but not for any of these.

Can anybody offer assistance?

Many thanks,
Terry


Avatar of rockiroads
rockiroads
Flag of United States of America image

Have u looked into ShellExecute? That has the ability to print files

ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

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 TerenceHewett
TerenceHewett

ASKER

Rocki - you rock!!  Thank you so much for this code, it has worked brilliantly. Just wondered though, with Word, Excel and PP when the file prints it opens up the file, prints and then closes.  With the PDF the code opens up the file and prints, which is great, but it leaves the reader application open.  Can this be closed in the same way as Word for example?

I will award the points anyway as you have been terrific but would quite like the PDF app to close after printing. If this is a separate question, let me know and I will post into a new question.

Cheers and thank you again.

Terry
When u right click in explorer on a PDF and select Print, what does it do?
The code basically emulates what would happen in Explorer

Only way I could think of is if we sent a close signal to that
Rocki,  I felt like I was asking too much for one post, so have reposted as a new question.  I like the idea you have of sending a close signal, so if you can help me with that, I would be very much appreciated.  The new post is at:

https://www.experts-exchange.com/questions/21982425/Opening-a-pdf-printing-it-and-then-closing-the-pdf-application-down.html

Best regards and thanks again.
Terry
ok, I found the api

PostMessage

but u need to handle of the window. Im not sure if FindWindow api call does that.
I will investigate
Nice of you to open another question, I would of answered here anyway, so appreciate how you appreciate the experts :)
or rather I appreciate!