Results 1 to 2 of 2

Thread: Data Report Designer and Choosing Printer

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    2

    I have a datareport that I need to print without using the printer dialoge box. I do this simply by

    DataReport1.PrintReport

    However I need this to goto a pritner that other than the defualt. I have tried the following code.

    Dim X As Printer
    For Each X In Printers
    If X.devicename = "hp laser" Then
    Set Printer = X
    Exit For
    End If
    Next

    This does change the printer.devicename to HP Laser
    However when I run datareport1.printreport it still prints to the windows default printer.

    How can I change this?

    Any help appreciated.

    Thanks

    Dan


  2. #2
    Lively Member
    Join Date
    Mar 2000
    Location
    Fort Lauderdale, FL USA
    Posts
    112
    I don't have the code with me here, but if I'm not mistaken, instead of changing the device name, I made the printer I wanted to print the default. Then when the form unload, I'd reset the original default printer back.
    Damonous

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width