View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
law8787 law8787 is offline
external usenet poster
 
Posts: 3
Default creating a macro to print PDF

I have a spreadsheet with lots of pages, and will like to print into PDF
format.

Below is the macro I used,
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"CutePDF Writer on CPW2:", PrToFileName:=("Test.pdf")

Everything work fine, the only problem is the PDF file size is 0k and can't
be open. When I manual print out the PDF, there is not problem.
Hope that someone can help...