Anyone know how I can automaticly put a pagebreak every so many lines in my textbox. Keep in mind, it must be a normal textbox...
Printable View
Anyone know how I can automaticly put a pagebreak every so many lines in my textbox. Keep in mind, it must be a normal textbox...
Sort of like this? :
VB Code:
Private Sub PrintText() Dim ArrTemp() As String arrTemp = Split(Text1.Text, vbCrLf) For x = 0 To UBound(arrTemp) Printer.Print arrTemp(x) Printer.NewPage Next x Printer.EndDoc End Sub
That prints one line on each page, just come up with a simple counter to put x amount of lines on each page
:)
what I am aiming for here is to print a text box, but at the top of each page, since the textbox will be more then one page, have a header. So, I need to make a loop or something to seperate the textbox into a few different sections about one less then how many fit onto the page.
crptcblade, i have been playing with your code. But even though I changed the value of x, only 2 lines print. What am I missing?
correction, its still 1
guess i have got a problem!
thnx!