![]() |
PrintToFile OutputFilename problems
I am trying to print to a file using the following line of code.
Selection.PrintOut PrintToFile:=True, OutputFilename:="c:\fundings.prn" This bombs out with a error: Run-time error '1004' Application-defined or object-defined error It works if I remove the "OutputFilename" parameter and enter manually at the prompt, however, I want to automate the outputfilename parameter. Has anyone seen this or do you have any ideas as to what I am doing wrong? Thanks, Brent |
PrintToFile OutputFilename problems
Try this Brent
Selection.PrintOut PrintToFile:=True, PrToFileName:="c:\fundings.prn" -- Regards Ron de Bruin http://www.rondebruin.nl "Brent Burkart" wrote in message ... I am trying to print to a file using the following line of code. Selection.PrintOut PrintToFile:=True, OutputFilename:="c:\fundings.prn" This bombs out with a error: Run-time error '1004' Application-defined or object-defined error It works if I remove the "OutputFilename" parameter and enter manually at the prompt, however, I want to automate the outputfilename parameter. Has anyone seen this or do you have any ideas as to what I am doing wrong? Thanks, Brent |
PrintToFile OutputFilename problems
My version of Excel (XL2000) doesn't have a OutputFilename parameter, it has
a PrToFileName parameter for the filename. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Brent Burkart" wrote in message ... I am trying to print to a file using the following line of code. Selection.PrintOut PrintToFile:=True, OutputFilename:="c:\fundings.prn" This bombs out with a error: Run-time error '1004' Application-defined or object-defined error It works if I remove the "OutputFilename" parameter and enter manually at the prompt, however, I want to automate the outputfilename parameter. Has anyone seen this or do you have any ideas as to what I am doing wrong? Thanks, Brent |
PrintToFile OutputFilename problems
That was it!
Thanks "Ron de Bruin" wrote in message ... Try this Brent Selection.PrintOut PrintToFile:=True, PrToFileName:="c:\fundings.prn" -- Regards Ron de Bruin http://www.rondebruin.nl "Brent Burkart" wrote in message ... I am trying to print to a file using the following line of code. Selection.PrintOut PrintToFile:=True, OutputFilename:="c:\fundings.prn" This bombs out with a error: Run-time error '1004' Application-defined or object-defined error It works if I remove the "OutputFilename" parameter and enter manually at the prompt, however, I want to automate the outputfilename parameter. Has anyone seen this or do you have any ideas as to what I am doing wrong? Thanks, Brent |
PrintToFile OutputFilename problems
That seems to work, however, its attempting to print to my default printer.
Should I have the parameter "ActivePrinter" set to anything? Thanks, Brent "Ron de Bruin" wrote in message ... Try this Brent Selection.PrintOut PrintToFile:=True, PrToFileName:="c:\fundings.prn" -- Regards Ron de Bruin http://www.rondebruin.nl "Brent Burkart" wrote in message ... I am trying to print to a file using the following line of code. Selection.PrintOut PrintToFile:=True, OutputFilename:="c:\fundings.prn" This bombs out with a error: Run-time error '1004' Application-defined or object-defined error It works if I remove the "OutputFilename" parameter and enter manually at the prompt, however, I want to automate the outputfilename parameter. Has anyone seen this or do you have any ideas as to what I am doing wrong? Thanks, Brent |
All times are GMT +1. The time now is 11:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com