From: Ken on
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



From: Ken on
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" <kolson1971(a)earthlink.net> wrote in message
news:ubLLgsMNKHA.4580(a)TK2MSFTNGP06.phx.gbl...
> 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
>
>
>