Solved

printing a text box

Posted on 1998-08-24
9
133 Views
Last Modified: 2010-04-30
How would i go about printing the contents of a textbox named txtmain
0
Comment
Question by:hess
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 7

Expert Comment

by:kamall
ID: 1430777
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.
0
 

Author Comment

by:hess
ID: 1430778
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
0
 
LVL 14

Expert Comment

by:waty
ID: 1430779
printer.print tbYourTextbox.Text

 Print eventually some other textbox


printer.enddocument ' *** Finish the printing document and spool it
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Author Comment

by:hess
ID: 1430780
i was hoping that kamall would answer this cause i need to give him some points
0
 
LVL 14

Expert Comment

by:waty
ID: 1430781
One solution is giving 15 points to kamall, and 15 points to me. ;)
0
 

Author Comment

by:hess
ID: 1430782
I guess i can give you 15 points so propose answer and they are yours
0
 
LVL 14

Accepted Solution

by:
waty earned 10 total points
ID: 1430783
printer.print tbYourTextbox.Text

 Print eventually some other textbox


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

Expert Comment

by:kamall
ID: 1430784
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.
0
 

Author Comment

by:hess
ID: 1430785
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.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month8 days, 17 hours left to enroll

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question