|
-
Jul 27th, 2000, 02:08 PM
#1
Thread Starter
New Member
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.
-
Jul 27th, 2000, 02:25 PM
#2
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|