|
-
Nov 13th, 2000, 11:07 AM
#1
Thread Starter
Lively Member
I cannot get my print to print out landscape or to print multiple pages. Here is some code I tried to copy, but I really have no idea what I am doing. I just want the user to be able to print multiple pages or landscape.
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.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
By the way my common dialog is not on the form I am printing from.
Thanks
Brandon
-
Nov 17th, 2000, 07:03 PM
#2
New Member
The number of copies to be printed can be set using the following command:
Printer.Copies = 2 'print 2 copies
To print in landscape:
Printer.Orientation = vbPROPLandscape
If you use the Printer Common Dialog to allow the user to specify the number of copies, you can do the following:
Printer.Copies = CommonDialog1.Copies
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
|