Help printing listview...my formatting needs work!
hello, i'm trying to print out the contents of a listview in an orderly fashion... i've got the contents all to print out, but getting them in nice columns like they appear on the listview control is proving to be a bigger challenge than i thought!
here is my code:
Code:
For i = 1 To lstStuff.ListItems.Count
Printer.Print lstStuff.ListItems(i); Tab(5); _
lstStuff.ListItems(i).SubItems(1); Tab(6); _
lstStuff.ListItems(i).SubItems(2); Tab(16); _
lstStuff.ListItems(i).SubItems(3); Tab(19); _
lstStuff.ListItems(i).SubItems(4); Tab(20); _
lstStuff.ListItems(i).SubItems(5); Tab(21); _
vbNewLine;
Next i
Printer.EndDoc
now that is printing out all the stuff in the columns of the first record in the list....
it seems it will only print in about a 2 inch margin on the left side of the page ?
here's how the output looks:
Quote:
Name 3
Description $7.00
2
4 pm
when what it should look like is:
Quote:
Name 3 Description $7.00 2 4pm
there should be 6 columns in there, but it's all gettin jumbled up... dunno if my tabbing is messed up, or if there's something else im doing wrong :(... please help, im very novice when it comes to printing! :p