Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print To File Question

Status
Not open for further replies.

Vanetti

Programmer
Sep 19, 2001
1
US
Hi,

I'm printing to a printer that is set up to 'Print To File' but I would like to programmatically provide the file name instead of the user inputting into the pop up box. Currently I have the following piece of code working but would rather not use SendKeys command. Anyone know another way?
msg = "This is my Text To Print"
strKeys = "C:\mysendkey.txt" & "~"
SendKeys strKeys, False
Printer.Print msg
Printer.EndDoc

Thank you,
Paula
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top