PDA

Click to See Complete Forum and Search --> : newpage property does not work properly


harminder
Dec 31st, 1999, 07:15 PM
Using Vsiual Basic 6.0
Enterprise Edition

Using printer.newpage in printing multiple pages does not work properly. It does not move on to new page. Only data from first page is printed.

Even program available under VB Help fails to produce required result.

Example :

for i=1 to 5
printer.print "sample output";i
printer.newpage
next i
printer.enddoc

The above lines expected to print five pages each with same message and changing number.

whereas on executing this program VB prints only the first page, displaying message

sample output 1

Please suggest the solution to this

Dec 31st, 1999, 08:26 PM
try using a "&" instead of the ";" in the message code.

Printer.print, "sample output " & i

and dont forget the comma

[This message has been edited by wossname (edited 01-01-2000).]

MartinLiss
Jan 1st, 2000, 05:36 AM
Something else must be going on either with your program(s) or your printer, because the code you supplied will print 5 pages just as you think it should.

------------------
Marty