-
I need to print the contents of a ritch text box.
The problem is I can't figure out how to print other text on the same page.
I tried using printer.print "Heading"
printer.print ritchtextbox1.text
but it came out ugly and not satisfying.
Is there a way to use the .selprint method , and print other text on the same page as well??
Is there a nother recomended way to solve my problem?
Is the truth out there??
Thanks.
Dan.
-
You can try something like this. Add a CommonDialog control control to your form and do something like this:
Code:
Private Sub Command1_Click()
With CommonDialog1
.Flags = cdlPDReturnDC + cdlPDNoPageNums
If RichTextBox1.SelLength = 0 Then
.Flags = .Flags + cdlPDAllPages
Else
.Flags = .Flags + cdlPDSelection
End If
.ShowPrinter
Printer.Print ""
RichTextBox1.SelPrint .hDC
End With
End Sub