Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / January 2008

Tip: Looking for answers? Try searching our database.

Can I only allow printing to pdf in Excel?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
nanook - 23 Jan 2008 01:20 GMT
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?
papou - 23 Jan 2008 10:08 GMT
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

>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?
John3005 - 23 Jan 2008 16:50 GMT
There is program caleld SnagIt it can catch printer output you could give it
a try.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.