|
-
Dec 4th, 2000, 10:24 AM
#1
Thread Starter
Lively Member
This code works good except it only prints to the default printer. Can Someone Help me. It prints out a picture.
Private Sub Command2_Click()
On Error GoTo ErrHandler
MainFrm.CommonDialog1.Flags = cdlPDNoSelection Or _
cdlPDNoPageNums Or _
cdlPDHidePrintToFile Or _
cdlPDUseDevModeCopies
MainFrm.CommonDialog1.PrinterDefault = False
MainFrm.CommonDialog1.CancelError = True
MainFrm.CommonDialog1.ShowPrinter
Printer.Copies = MainFrm.CommonDialog1.Copies
Printer.Orientation = MainFrm.CommonDialog1.Orientation
Printer.Print ""
Printer.Print ""
Printer.Print Tab(12);
Printer.Print Label2.Caption
Printer.Print Tab(12);
Printer.Print Label3.Caption
Printer.PaintPicture Image1.Picture, 1000, 1000
Printer.EndDoc
Exit Sub
ErrHandler:
Dim RetVal As Integer
RetVal = MsgBox("Canceling Print Job", 0, "Printer ")
Exit Sub
End Sub
Thanks
Brandon
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|