Results 1 to 2 of 2

Thread: Printing Contents of ritch text box

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    u.s.a
    Posts
    127
    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.


  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    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

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