View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Excel vba printout method

What version of Excel. Did you look at Excel VBA help on the printout
method. In xl2000 and later, you can specify the file name to print to.

--
Regards,
Tom Ogilvy

"Curtis" wrote in message
om...
Hello all,

I've went throw all posts on vba excel printout codes and none worked.

I am using excel to create a file and i want to save it in pdf format
but dont want the popup that asks the filename to save under

here is the code that i'm using:

Application.ActivePrinter = "Adobe PDFWriter sur LPT1:"
ActiveWorkbook.SaveAs FileName:="C:\toto.xls"
ActiveWorkbook.PrintOut

I've tried specifying parameter of printout with no success

Help please
Curtis