Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default On some PC's prints to default windows printer rather then Acrobat PDF defined in code

I'm using the Ken McDaniels version (see link below) of automatically
printing an Excel spreadsheet to Acrobat PDF.
http://www.planetpdf.com/mainpage.asp?webpageid=762

It works perfectly. However, on one PC it always prints to the DEFAULT
windows printer rather the Acrobat Pro. If I change the default windows
printer to Acrobat, then it creates the PDF. On another PC it ignores the
default windows PC and prints to the defined PDF.

Ken



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default On some PC's prints to default windows printer rather then Acrobat PDF defined in code

Ok, here is the code in case anyone can benefit from it.

What is interesting is that every printer name in your "Printer and Faxes"
folder ends in "on NeXX", where "XX" is a different number for each printer
listed. Therefore, you must use the STOP as shown below and then hover over
the line above it to know what number will replace the XX.

If someone would like to contribute a method of automating the process of
figuring out the XX, and feeding it to the code, that would be great.

'Print the document to PDF specifically using the"Adobe PDF on Ne07:"
Dim STDprinter As String

STDprinter = Application.ActivePrinter
'To get the adobe PDF printer name, set it as the default printer
and use this stop
' then hover over the line above to get the actual printer name
'Stop

' change printer
Application.ActivePrinter = "Adobe PDF on Ne07:"
' prints the active sheet
ActiveSheet.PrintOut , PrintToFile:=True
' change back to standard printer
Application.ActivePrinter = STDprinter

Thanks,

Ken

"Ken" wrote in message
...
I'm using the Ken McDaniels version (see link below) of automatically
printing an Excel spreadsheet to Acrobat PDF.
http://www.planetpdf.com/mainpage.asp?webpageid=762

It works perfectly. However, on one PC it always prints to the DEFAULT
windows printer rather the Acrobat Pro. If I change the default windows
printer to Acrobat, then it creates the PDF. On another PC it ignores the
default windows PC and prints to the defined PDF.

Ken





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
store default printer, change printer and then restore default printer? Dennis Pedersen Excel Programming 0 November 14th 07 09:18 PM
Printing to Local Printer and the not the default printer. [email protected] Excel Programming 1 September 13th 07 02:18 PM
members on my network printer not able to print to default printer smeheut Excel Discussion (Misc queries) 0 June 18th 07 06:42 PM
How do I create a macro that prints to any default printer Wanna Learn[_2_] Excel Programming 1 March 1st 06 07:40 PM
printer prints 1/2 page then ejects rfiler Excel Discussion (Misc queries) 2 December 22nd 05 02:47 PM


All times are GMT +1. The time now is 05:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"