Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page Breaks

Status
Not open for further replies.

invincibleian

Programmer
Jan 4, 2001
2
US
I am sending text into a rich text box. I send text in groupings. I want only four groups of info per page. After each 4th group I would like to insert a page break. I don't know how! Instead I have been printing the rich text box after every fourth group, then rtf="", etc, etc. If I have 100 groups I send 25 print jobs to the printer. If I could insert a pagebreak I would only have to send 1 print job.

Thanks,
Ian
 
I don't know if this can help, but consider the code below to print on different page :

This code prints 12 numbers on 3 pages, 4 numbers each. (not tested)


Dim objP as Printer
Dim btCount as Byte
Dim iLoop as Integer


For iLoop = 1 To 12 'start looping to print text

objP.Print "Loop No : " & iLoop
btCount = btCount + 1

If btCount = 4 Then
btCount = 0 'reset param
objP.NewPage 'change page
End If
Next

objP.EndDoc 'send to printer

Set objP = Nothing



:)
 
invincibleian,

Hello,
Were you ever able to get the page break to work in your report? I'm also very interested in finding out if the page break is possible. My report just needs to have page breaks as a text field changes (department number). It seems like such a simple thing that should work with the data report. Any help would be appreciated.

Thanks,
Corinne
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top