I'm developing an app using Visual Basic 6.0; i used the VB app wizard to get started. I added a print button and it works just fine: it shows the print dialog when clicked.. the bad thing is that when i actually click print in the dialog, the dialog just closes but no document is printed... ¿what's wrong with the code?
Her's the genereted code:
Private Sub mnuArchivoImprimir_Click()
On Error Resume Next
If ActiveForm Is Nothing Then Exit Sub
With dlgCommonDialog
.DialogTitle = "Print"
.CancelError = True
.Flags = cdlPDReturnDC + cdlPDNoPageNums
If ActiveForm.rtfText.SelLength = 0 Then
.Flags = .Flags + cdlPDAllPages
Else
.Flags = .Flags + cdlPDSelection
End If
.ShowPrinter
If Err <> MSComDlg.cdlCancel Then
ActiveForm.rtfText.SelPrint .hDC
End If
End With
End Sub
Also, how can i format the form so it is able to print in Letter size pages?
Thanks! and please help this newbie! :confused:
