View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_2_] Nigel[_2_] is offline
external usenet poster
 
Posts: 735
Default creating a macro to print PDF

Not sure I understand what is not working?

"The pdf size is 0k and can't be opened" and "When I manual print the PDF,
there is no problem"

Sounds like the pdf driver is either not working correctly or needs
updating.

--

Regards,
Nigel




"law8787" wrote in message
...
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...