G
Guest
Having checked the output in print preview I'm trying to then print to file
but despite having given a PrToFileName it always produces a popup asking for
the file name. Other than this it works fine and does work if I give the
name at the prompt, it's just that I want to automated the file naming.
I'm using Excel 2000. Can someone please point out my mistake.
The PrintOut line is all on one line it's just split on this posting.
fname = "C:\temp.fax"
Sheets(Array("statistics", "graph")).PrintOut Preview:=True,
ActivePrinter:="Faxmaker on Ne00:", PrintToFile:=True, PrToFileName:=fname
but despite having given a PrToFileName it always produces a popup asking for
the file name. Other than this it works fine and does work if I give the
name at the prompt, it's just that I want to automated the file naming.
I'm using Excel 2000. Can someone please point out my mistake.
The PrintOut line is all on one line it's just split on this posting.
fname = "C:\temp.fax"
Sheets(Array("statistics", "graph")).PrintOut Preview:=True,
ActivePrinter:="Faxmaker on Ne00:", PrintToFile:=True, PrToFileName:=fname