|
-
Jul 27th, 2006, 11:23 AM
#1
Thread Starter
New Member
Printing DUPLEX using PrintForm
I know using PrintForm is not the best alternative but at this stage I must stay with it... What is wrong with the following code it refuses to print Duplex even if the properties in the print dialog box is checked as duplex???????
Private Sub mnuPrint_Click()
Dim BeginPage, EndPage, NumCopies, i
' Set Cancel to True
CommonDialog1.CancelError = True
On Error GoTo ErrHandler
' Display the Print dialog box
CommonDialog1.ShowPrinter
' Get user-selected values from the dialog box
BeginPage = CommonDialog1.FromPage
EndPage = CommonDialog1.ToPage
NumCopies = CommonDialog1.Copies
For i = 1 To NumCopies
' Put code here to send data to the printer
Form1.PrintForm
Printer.Duplex = vbPRDPHorizontal
SetPrinterDuplex = 3
'Printer.NewPage
Form2.PrintForm
Printer.EndDoc
Next i
Exit Sub
ErrHandler:
' User pressed the Cancel button
Exit Sub
End Sub
Thanks
Mitch
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
|