Results 1 to 2 of 2

Thread: Multiple Pages From Common Dialog Printer

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Posts
    93
    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

  2. #2
    New Member
    Join Date
    Oct 1999
    Location
    Redmond, WA, USA
    Posts
    2
    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
  •  



Click Here to Expand Forum to Full Width