Results 1 to 2 of 2

Thread: Urgent: Printing just text in a form

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    4
    I have a form in which i need to only print out the text in the boxes, ect. Problem is i dont want to use
    Me.PrintForm
    Instead i would like to just print the text within the form.

    Please help Urgent.

  2. #2
    Member
    Join Date
    Apr 1999
    Location
    Reno, NV
    Posts
    57
    Hello

    Dim X As Object
    dim sS as String

    ss = "This is some text from any source"

    'all the printers on the machine have an index, so you could use: 'Set Printer = Printers(0)

    'if not then search for the printer you want to use.
    ' this finds the printer and sets it to the default
    For Each X In Printers
    If X.DeviceName Like "*HP*" Then
    ' Set printer as system default.
    Set Printer = X
    ' Stop looking for a printer.
    Exit For
    End If
    Next

    'now print
    printer.Print X.DeviceName
    Printer.Print sS

    'this tells the printer to print
    Printer.EndDoc

    put this in a command button, you might have to change the printer type("*HP*") if you are not using a HP printer.

    hope this helps?

    -William

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