Can I only allow printing to pdf in Excel?


N

nanook

I have created a template in Excel which has been set up so that the layout
is perfect when printing to pdf (which is how the document will mostly be
used) but the layout changes if printing direct to our printer. Is there a
way that I can ONLY allow printing to pdf from this document?
 
Ad

Advertisements

P

papou

Hello

You may consider using some VBA to achieve this.
One way is to use the Workbook_BeforePrint event and specify the pdf printer
in the PrintOut method, eg:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PrintOut copies:=1, ActivePrinter:="CutePDF Writer on CPW2:"
End Sub

Please note you will need to amend the **activeprinter** name part of my
code to match precisely your pdf printer description.
To make sure that you use the correct printer description:
Set the default printer to your pdf printer
in a module paste this macro and note the exact description shown:
Sub ShowPrnName()
Msgbox Application.ActivePrinter
End Sub

Remember to set the previous default printer back.

HTH
Cordially
Pascal
 
Ad

Advertisements

J

John3005

There is program caleld SnagIt it can catch printer output you could give it
a try.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top