View Single Post
  #5   Report Post  
Gary Brown
 
Posts: n/a
Default

I just thought of something else. You say you just got upgraded to a new
computer. Are you sure it has Acrobat Distiller on it?
--
Gary Brown



"Marc Bobrow" wrote:

Thanks for this suggestion, Gary. I feel a little foolish, but I don't know
how to do what you are suggesting. Adding the script you suggested to my
existing macro did not work. What do I do to run this?

"Gary Brown" wrote in message
...
Maybe the new configuration looks at the printer differently.
Run this...
Debug.Print Application.ActivePrinter
to check out what the syntax should be.
Don't know if this will solve your problem, however.
Good Luck and Hope this Helps,
--
Gary Brown



"Marc Bobrow" wrote:

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...