View Single Post
  #1   Report Post  
Marc Bobrow
 
Posts: n/a
Default macro to run series of reports to PDF

I use the macro below with Hyperion Enterprise Retreive (an Excel add-in) to
run a series of reports and save them to PDF files. The macro works great
with my Win2000Pro machine running Excel 2000, but I've been upgraded to an
XP machine with Excel 2003. The macro gets stuck on the row:
Application.ActivePrinter = "Acrobat Distiller on Ne00:"
Any thoughts as to why?

Thanks,

Marc



Range("$K$1").Select
ActiveCell.FormulaR1C1 = "report1"
Range("$c$21").Select

Dim PSFileName As String
Application.ActivePrinter = "Acrobat Distiller on Ne00:"
Application.Goto Reference:="r1c1"
Let PSFileName = Application.ActiveCell
SendKeys PSFileName & "{ENTER}", False
ActiveSheet.PageSetup.PrintArea = "$G$1:$AM$83"
ActiveSheet.PrintOut , PrintToFile:=True
PSFileName = Chr(34) & PSFileName & Chr(34)

Range("$K$1").Select
ActiveCell.FormulaR1C1 = "report2"
Range("$c$21").Select

Application.ActivePrinter = "Acrobat Distiller on Ne00:"
Application.Goto Reference:="r1c1"
Let PSFileName = Application.ActiveCell
SendKeys PSFileName & "{ENTER}", False
ActiveSheet.PageSetup.PrintArea = "$G$1:$AM$83"
ActiveSheet.PrintOut , PrintToFile:=True
PSFileName = Chr(34) & PSFileName & Chr(34)

The macro continues on for a list of around 50 reports...