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.
Printable View
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.
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