We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

printing a text box

hess
hess asked
on
Medium Priority
156 Views
Last Modified: 2010-04-30
How would i go about printing the contents of a textbox named txtmain
Comment
Watch Question

Dr. Kamal MehdiIT Director / IT Project Manager
CERTIFIED EXPERT

Commented:
Use the printer object to print the text as shown below:

Printer.Print MyString

MyString is the string to print. Note that the printer object does not wrap text. Therefore, you must read the characters one by one from the text box and use the TextWidth function and compare it with the Printer.ScaleWidth to determine if the line fits on the page width. If not, start a new line.

Hope that helps.

Author

Commented:
This does answer my question but if you could tell me how to find out when the printer is finished i'll give you 15 more pts

Commented:
printer.print tbYourTextbox.Text

 Print eventually some other textbox


printer.enddocument ' *** Finish the printing document and spool it

Author

Commented:
i was hoping that kamall would answer this cause i need to give him some points

Commented:
One solution is giving 15 points to kamall, and 15 points to me. ;)

Author

Commented:
I guess i can give you 15 points so propose answer and they are yours
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Dr. Kamal MehdiIT Director / IT Project Manager
CERTIFIED EXPERT

Commented:
hess,
Sorry for being away for a few days.
I am seeing that you rejected my answer (that was really the answer to your original question) just because you put another question!.
Anyway, if you would like to give me some points, thanks. If not, there is no problem.
Regards.

Author

Commented:
shure, I'll give you some points. There will shortly be a question called "15pts for karmall" and i'll only let you answer it ok.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.