Question Printing the content of a userform like a serial-letter in Word

Shinoro

New member
Joined
Jan 2, 2013
Messages
1
Programming Experience
Beginner
Hi all,

I've got a problem with my program. I'm supposed to write a service tool for my company, but the last time I did something like that was in 10th grade. The program runs (almost) well but I have no idea how to print the content of the textboxes, comboboxes etc.
It is supposed to look like a serial letter in Microsoft word.

Does anybody has an idea how to solve this problem?
Many thanks in advance!

Shinoro
 
Unless you find a 3rd party control, you'll need the PrintDocument Class (System.Drawing.Printing)
Basically you'll just go down the "page" using e.Graphics.DrawString() passing it the TextBox's Text value and the other parameters. You can also use a Rectangle with some of the formatting flags set to make it easier to dictate how it prints when you have a large block of text all at once.

There's all kinds of other examples available via Google searching.
 
Back
Top