if ure code looks something like below
Code:
On Error GoTo printerror
' The CommonDialog control is named "dlgPrint."
Form1.dlgprint.Flags = cdlPDReturnDC + cdlPDNoPageNums
If Form1.RichTextBox1.SelLength = 0 Then
Form1.dlgprint.Flags = Form1.dlgprint.Flags + cdlPDAllPages
Else
Form1.dlgprint.Flags = Form1.dlgprint.Flags + cdlPDSelection
End If
Form1.dlgprint.ShowPrinter
Form1.RichTextBox1.SelPrint Form1.dlgprint.hDC
Exit Sub
printerror:
MsgBox "Print Error!"
u will notice the + cdlPDNoPageNums is added, this disables the page selection part. Dont include this then u can select the pages, more info here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cmdlg98/html/vbproFlagsPrint.asp
Enter your message below
Sign in or Join us (it's free).