Logo

Advertisement

HELP Print Listview Print To Many Page

www.xtremevbtalk.com

HII am using this to print ListviewWhen I print 1 page then it is ok butif data from Listview go on 3 or 4 page then fyrst page is okefter fyrst page I only get 1 data on on each page so this can be many page Can somone help me what is wrong in this ?? Printer.Font = "Tahoma" Printer.FontBold = True Printer.FontUnderline = False Printer.FontSize = 10 Printer.Print "Print from listview" Printer.FontUnderline = False Printer.Print vbNewLine Printer.CurrentX = 1440 Printer.CurrentY = 1440 PrintListView lvwDataCopy Printer.EndDocPrivate Sub PrintListView(lvw As ListView)Const Margin = 60Const COL_MARGIN = 240Dim ymin As SingleDim ymax As SingleDim xmin As SingleDim xmax As SingleDim num_cols As IntegerDim column_header As ColumnHeaderDim list_item As ListItemDim i As IntegerDim num_subitems As IntegerDim col_wid() As SingleDim X As SingleDim y As SingleDim line_hgt As Single xmin = Printer.CurrentX ymin = Printer.CurrentY ' ****************** ' Get column widths. num_cols = lvw.ColumnHeaders.Count ReDim col_wid(1 To num_cols) ' Check the column headers. For i = 1 To num_cols col_wid(i) = _ Printer.TextWidth(lvw.ColumnHeaders(i).Text) Next i ' Check the items. num_subitems = num_cols - 1 For Each list_item In lvw.ListItems ' Check the item. If col_wid(1) < Printer.TextWidth(list_item.Text) _ Then _ col_wid(1) = Printer.TextWidth(list_item.Text) ' Check the subitems. For i = 1 To num_subitems If col_wid(i + 1) < _ Printer.TextWidth(list_item.SubItems(i)) _ Then _ col_wid(i + 1) = _ Printer.TextWidth(list_item.SubItems(i)) Next i Next list_item ' Add a column margin. For i = 1 To num_cols col_wid(i) = col_wid(i) + COL_MARGIN Next i ' ************************* ' Print the column headers. Printer.CurrentY = ymin + Margin Printer.CurrentX = xmin + Margin X = xmin + Margin For i = 1 To num_cols Printer.CurrentX = X Printer.Print FittedText( _ lvw.ColumnHeaders(i).Text, col_wid(i)); X = X + col_wid(i) Next i xmax = X + Margin Printer.Print line_hgt = Printer.TextHeight("X") y = Printer.CurrentY + line_hgt / 2 Printer.Line (xmin, y)-(xmax, y) y = y + line_hgt / 2 ' Print the rows. num_subitems = num_cols - 1 For Each list_item In lvw.ListItems X = xmin + Margin ' Print the item. Printer.CurrentX = X Printer.CurrentY = y Printer.Print FittedText( _ list_item.Text, col_wid(1)); X = X + col_wid(1) ' Print the subitems. For i = 1 To num_subitems Printer.CurrentX = X Printer.Print FittedText( _ list_item.SubItems(i), col_wid(i + 1)); X = X + col_wid(i + 1) Next i y = y + line_hgt * 1.5 Next list_item ymax = y ' Draw lines around it all. Printer.Line (xmin, ymin)-(xmax, ymax), , B X = xmin + Margin / 2 For i = 1 To num_cols - 1 X = X + col_wid(i) Printer.Line (X, ymin)-(X, ymax) Next iEnd Sub

View Answers
Very similar questions

Advertisement

Advertisement

Forms Data Controls :: Print Current Page And All Pages Of Listview? forums.asp.net

I have a listview.When I click a "Print" button It should be print only listview items (current page & all pages).

VS 2008 - Drawing ListView Using E.Graphics www.vbforums.com

I have been looking through the code bank and i cant find anything that is helping me with my problem what i have is a print button that when clicked it goes to my print preview page, then i can print the file. i have got all the other controls on my page to display correctly using this example e.Graphics.DrawString(sType, New Font("Arial", 10, FontStyle.Underline), Brushes.Black, 110, 650) but how can i get my ListView header and content to preview on the page as well. my listView has 5 columns and i am using the PrintDocument control.

Printing Many Columns? forums.codeguru.com

i have a printing code which prints a listview however if a listview contains many columns it cuts the columns and will not print all the columns needed

Printing ListView As Simple Report social.msdn.microsoft.com

I am using following code for printing Listview items in vb 2008: #Region "Print related declarations" Protected WithEvents pd As Printing.PrintDocument 'used by Print sub Protected Ratio As Single = 0, CurrRow As Integer = 0 #End Region #Region "Simple Printing of ListView" ''' <summary> ''' Print the List view as a simple report [Code] ..... The code is working fine except a few requirements: a) The lines at the end of listview " Net Amount, Paid Amout and Balance" need some adjustments. Like upto 45 records of listview these lines are displayed perfectly on one page. When the number of records are 46, only NetAmount and PaidAmount are displayed and when the number of records are 47 only NetAmount is displayed. I think I have a problem in the code segment of HasMorePages. How I can limit that the three lines of " Net Amount, Paid Amount and Balance" are displayed on first page correctly. b) How I can add a footer to the print preview to display number of pages in the format 1 of 1, 1 of 2 and so on.

Print Listview Selected Items www.vbforums.com

hi ,please help.how to print all the selected items in a listview??thanks for help.

Disabling Rows In A Listview www.vbforums.com

Hi Is there is a way that I can disable rows in a Listview?.I want to do this:For example:I add 5 items to a listview then I have a buttom "cmdPrint" to print those Items, if I click "Print", I want to disable the 5 item and the same time i want to add new items and if I click print the new Item need to be disable too. This is to prevent that if I print an "Order" the users can modified the items.I'll appreciate you help,Elvis Cabral

Setup A Print Button On A Webpage And Settings To Print The Page From A Landscape View stackoverflow.com

I'm wondering if anyone has had any experience modifying print settings via a web page. My overall goal would be to setup a print button on a web page <a href="javascript:window.print()">Print This Page</a> And at the same time modify the users print settings to print the page from a landscape view. Input on if this is even possibly, Modifying the page layout isn't really an option. I thought about using a separate style sheet for the printing page but that doesn't help with what I'm actually printing.

Printing A Listview Report www.xtremevbtalk.com

hi, guys, i have printing problems here...ok, i am populating my database's records into a listview control (refer to my attachment)... now i want to have a command button which can directly print out the data just exactly like what the listview displayed. how to do that? (and i want it to be print out in landscape)....pls help....as i dunno the printer function at all....thanks for help..^.^

Listview And Crystal Reports www.xtremevbtalk.com

HiPlease help! I've got a form with a Listview control as well as a few buttons and checkboxes. On the Listview I have a popupmenu from where I can print a report for the selected item in the Listview.I print my report using Crystal Reports 7. When I select print the report is displayed on the screen from where I can select to print it or not.The problem is when I return from the report screen to the form with the Listview control the Listview and checkboxes is not visible anymore but the buttons is there. Only a grey screen where the Listview and checkboxes should be. If I then click in that area where the listview should be the unvisible listitem that I click on is displayed but the rest is still gone!Which event is suppose to fire when returning to the form from the Crystal Report. Form_Activate doesn't fire when returning from the report but it does when returning from another form. Any help greatly appreciated.Bezzie

RESOLVED:problem Using First Colum Of Listview www.vbforums.com

Hi all . i am trying to use first colum of listview using the following method but i keep getting compile error.argument not optional. could any one help me fix this problem.Thankserror at : Quote: Print #1, "<location>" & ListView1.ListItems & "</location>"Code: For i = 1 To ListView1.ListItems.Count Print #1, "<track>" Print #1, "<creator>By me</creator>" Print #1, "<title>" & ListView1.ListItems(i).SubItems(1) & "</title>" Print #1, "<location>" & ListView1.ListItems & "</location>" Print #1, "<image>" & ListView1.ListItems(i).SubItems(2) & "</image>" Print #1, "</track>" Next

Advertisement

Listview.listitem.add PROBLEM! www.vbforums.com

'load questions from selected category For I = 1 To UBound(IIndexArray.Category(SELECTED_CAT).Question) Debug.Print Questions(IIndexArray.Category(SELECTED_CAT).Question(I)).Question 'load into listview If Questions(IIndexArray.Category(SELECTED_CAT).Question(I)).Selected = True Then 'if the question is in the quiz LVquestions.ListItems.Add I, , "+ " & Questions(IIndexArray.Category(SELECTED_CAT).Question(I)).Question Else 'if the question is not in the quiz LVquestions.ListItems.Add I, , Questions(IIndexArray.Category(SELECTED_CAT).Question(I)).Question End If Next Ithis is my code, the "Questions(xxxx).question" is a stringwhen i used debug.print i get the string to print outbut in the code below debug.print with the same UDT string nothing prints out into the listview.well... sometimes text does print outthe text will only print out for some strings, the condition is that the "SELECTED_CAT" variable must be 1. if that variable is greater than 1 the string doesn't print out for some reason.i have never used listview before, but this is such a simple problem, and i am frustrated because debug.print works all of the time, but LVquestions.listitem.add only works some of the time.please help

Printing Listview Contents www.codeguru.com

Can u help me on how to print the contents of a listview control ?

ShowPrint Issue www.vbforums.com

I've got the below code to print the contents of a listview which all works fine. The problem is once the user has selected the printer and clicks Print it takes 10+ seconds for the print dialog box to disappear and the printing starts.Has anyone else come across this and/or know of a way so as soon the print button is pressed the print dialog box disappears?VB Code:Private Sub cmdPrint_Click()On Error Resume Next        With CD1    .CancelError = True    .ShowPrinter    End With     If Err.Number = 32755 ThenExit SubEnd If   'Code to print listview here End Sub

Print Preview www.codeguru.com

Hi Everyone,I have cooked up some code to print everything that is on a form. The only problem though, is that I cannot see what I have done until I print the form. Is there any code out there that I can use to create a print preview? On the form I currently have some text boxes, a ListView control, labels and a few horizontal lines on the page. I would appreciate any help. Thanks.

Data Report Preview From Listview www.vbcity.com

I have listview control in report mode in main form.......this control contains many listitems and sub items. there is one command button on the main form........all i want to do is that when i click that button....i want to view report print preview that contains listview columnheaders and listitems as well. I know all about listview item.....but don't know how to do print preview, using dataenvironment........but data doesnot comes from database, it comes from listview on the main form Please someone help me out!!

Print Multicolumns From Listview? www.dreamincode.net

I have a listview which the user populates with data. The listview has 3 columns but I wish to print out just 2 of these columns. I can get the code to print both columns but they print in the same location on the page. I have tried to move the second column to the right but cannot get it to work.[code]...

Print Form As Picture? www.xtremevbtalk.com

AllI am trying to print the contents of a form and three listviews, so far I can print the form on one page and the contents of my listviews on other pages.Is there a way to save my whole form as a picture to the printer so I can add the rest of my data below it on the same page? Something similar to Code:Printer.PaintPicture frmPerson.PictureOr is there another method?cheersGibbo

ListView With TreeView www.xtremevbtalk.com

Hello to all,I have a ListView and when I clickedan item in the ListView, I need to expand or branchedinto a TreeView.Here is my listview-----------------------CustomerOrderInventoryStock-----------------------Here is my TREEVIEWCustomer+ Add new customer -Edit a customer -Print customer -Delete customerOrder+ Add new Order -Edit a Order -Print Order -Delete OrderInventory+ Add new Inventory -Edit a Inventory -Print Inventory -Delete InventoryStock+ Add new Stock -Edit a Stock -Print Stock -Delete StockThanks a bunch

Loading Pre Saved Listveiw Data www.vbforums.com

I have been having trouble saving and retreiving data from listviews and recording it to dat files.After awile i figured out how to save the data but am now having trouble loading the data back to the listview.My code for saving is as below.Private Sub cmdsave_Click() Dim FileNo As Long Dim i As Long FileNo = FreeFile Open App.Path & "Recent.DAT" For Output As FileNo For i = 1 To lsvdata.ListItems.Count Print #FileNo, lsvdata.ListItems(i) & "|" & lsvdata.ListItems(i).SubItems(1) Print #FileNo, lsvdata.ListItems(i) & "|" & lsvdata.ListItems(i).SubItems(2) Print #FileNo, lsvdata.ListItems(i) & "|" & lsvdata.ListItems(i).SubItems(3) Print #FileNo, lsvdata.ListItems(i) & "|" & lsvdata.ListItems(i).SubItems(4) Print #FileNo, lsvdata.ListItems(i) & "|" & lsvdata.ListItems(i).SubItems(5) Print #FileNo, lsvdata.ListItems(i) & "|" & lsvdata.ListItems(i).SubItems(6) Print #FileNo, lsvdata.ListItems(i) & "|" & lsvdata.ListItems(i).SubItems(7) Print #FileNo, lsvdata.ListItems(i) & "|" & lsvdata.ListItems(i).SubItems(8) Print #FileNo, lsvdata.ListItems(i) & "|" & lsvdata.ListItems(i).SubItems(9) Print #FileNo, lsvdata.ListItems(i) & "|" & lsvdata.ListItems(i).SubItems(10) Print #FileNo, lsvdata.ListItems(i) & "|" & lsvdata.ListItems(i).SubItems(11) Next i Close FileNoEnd SubAny help would be good.Untouchable

Print Listview Listitems And Columnheader www.vbforums.com

How to set the A4 paper to print the listview listitems and listview column header as lanscape or potrait?By default it print as potrait. So How to set the paper to print as lanscape if the columnheader reach the A4 limit margin size?Code:'Print Column HeaderDim head As ColumnHeader Dim colColumnIndexes As Collection Dim Idx As Long Dim iTab As Long Set colColumnIndexes = New Collection iTab = 5 Printer.FontUnderline = True 'Print the column headers and load the collection of 'column indexes that will be used when printing the ListView data. For Idx = 0 To printtext.List2.ListCount - 1 For Each head In Form5.ListView2.ColumnHeaders If printtext.List2.List(Idx) = head.Text Then Printer.Print Tab(iTab); printtext.List2.List(Idx); iTab = iTab + 30 colColumnIndexes.Add head.SubItemIndex End If Next Next Printer.Print Printer.Print vbCrLf'Print ListItem Dim item As ListItem Dim strItem As String For Each item In Form5.ListView2.ListItems iTab = 5 For Idx = 1 To colColumnIndexes.Count Printer.FontUnderline = False If colColumnIndexes(Idx) = 0 Then 'this is not a subitem, so print the listitem data strItem = item.Text Else strItem = item.ListSubItems(colColumnIndexes(Idx)).Text End If Printer.Print Tab(iTab); strItem; iTab = iTab + 25 Next Printer.Print Next Printer.EndDoc

How To Print Check Item In Listview www.daniweb.com

i have create 1 listview & checkbox inside listview. how to print check item in listview.

Export Data In Listview To Crystal Report www.codeguru.com

I have a listview with data pulled from my MySQL database.NOw I would like to print out the data in the listview. Note that my intention is just to print it.I planned on using crystal report to print, to be more specific, i am thinking of first exporting the data to crystal report then call the print function to pribnt it. But how do I start? Do I even need crystal report in thye first place, because I just want the printing functuion?

Printing Listview Headers? www.xtremevbtalk.com

Can anyone tell me why my listview headers are not printing in my function pleaseThanksGibboCode:Public Function PrintLW(Lw As ListView) Dim sData As String Dim X As Integer Dim sIdx As Integer sIdx = Lw.ColumnHeaders.Count - 1 On Error Resume Next Printer.Print Tab(4), "Print" Printer.Print For i = 1 To sIdx sData = sData & " " & Lw.ColumnHeaders.Item(i).Text Next For i = 1 To Lw.ListItems.Count sData = Lw.ListItems.Item(i).Text For X = 1 To sIdx sData = sData & " " & Lw.ListItems.Item(i).SubItems(X) Next Printer.Print sData sData = "" Next Printer.EndDoc End Function

Newpage Property Does Not Work Properly www.vbforums.com

Using Vsiual Basic 6.0Enterprise EditionUsing 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.newpagenext iprinter.enddocThe 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 messagesample output 1Please suggest the solution to this

Printing Listview On Multiple Pages www.codeguru.com

Hi!I would appriciate help with listview printing. First let me state, that I`m am new on your forums, I followed link from vb-helper.com and I am using the code from "Print the values in a ListView control" article to print contents of listview. I`m am also a newbie in programming, so now I`m stuck on the code I retrieved from vb-helper.com. I managed to customize the code so, that it only prints columns that are selected, to be shown in listview, in an listbox named lstMeritve. As already stated, the problem is when listview is bigger than the A4 paper, the code than prints good on first paper, but every next line in listview gets on its own paper. I would need someone to help me modify the code in that way, that it would be able to print on multiple papers, with the headers of columns present on every paper! The oce is used can be found on vb-helper.com!The print listview code follows:Code:Private Function FittedText(ByVal txt As String, ByVal wid As Single) As String Do While Printer.TextWidth(txt) > wid txt = Left$(txt, Len(txt) - 1) Loop FittedText = txtEnd FunctionPrivate Sub PrintListView(lvw As ListView)Const MARGIN = 30Const COL_MARGIN = 120Dim ymin As SingleDim ymax As SingleDim xmin As SingleDim xmax As SingleDim num_cols As IntegerDim column_header As ColumnHeaderDim list_item As ListItemDim i As IntegerDim num_subitems As IntegerDim col_wid() As SingleDim X As SingleDim Y As SingleDim line_hgt As Single xmin = Printer.CurrentX ymin = Printer.CurrentY ' ****************** ' Get column widths. ReDim col_wid(1 To lstMeritve.SelCount + 1) ' Check the column headers. For i = 1 To lstMeritve.SelCount + 1 col_wid(i) = Printer.TextWidth(lvw.ColumnHeaders(i).Text) Next i ' Check the items. num_subitems = lstMeritve.SelCount For Each list_item In lvw.ListItems ' Check the item. If col_wid(1) < Printer.TextWidth(list_item.Text) Then _ col_wid(1) = Printer.TextWidth(list_item.Text) ' Check the subitems. For i = 1 To num_subitems If col_wid(i + 1) < Printer.TextWidth(list_item.SubItems(i)) Then _ col_wid(i + 1) = Printer.TextWidth(list_item.SubItems(i)) Next i Next list_item ' Add a column margin. For i = 1 To lstMeritve.SelCount + 1 col_wid(i) = col_wid(i) + COL_MARGIN Next i ' ************************* ' Print the column headers. CommonDialog1.ShowPrinter Printer.CurrentY = ymin + MARGIN Printer.CurrentX = xmin + MARGIN X = xmin + MARGIN For i = 1 To lstMeritve.SelCount + 1 Printer.CurrentX = X Printer.Print FittedText( _ lvw.ColumnHeaders(i).Text, col_wid(i)); X = X + col_wid(i) Next i xmax = X + MARGIN Printer.Print line_hgt = Printer.TextHeight("X") Y = Printer.CurrentY + line_hgt / 2 Printer.Line (xmin, Y)-(xmax, Y) Y = Y + line_hgt / 2 ' Print the rows. num_subitems = lstMeritve.SelCount For Each list_item In lvw.ListItems X = xmin + MARGIN ' Print the item. Printer.CurrentX = X Printer.CurrentY = Y Printer.Print FittedText( _ list_item.Text, col_wid(1)); X = X + col_wid(1) ' Print the subitems. For i = 1 To num_subitems Printer.CurrentX = X Printer.Print FittedText( _ list_item.SubItems(i), col_wid(i + 1)); X = X + col_wid(i + 1) Next i Y = Y + line_hgt * 1.5 Next list_item ymax = Y ' Draw lines around it all. Printer.Line (xmin, ymin)-(xmax, ymax), , B X = xmin + MARGIN / 2 For i = 1 To lstMeritve.SelCount X = X + col_wid(i) Printer.Line (X, ymin)-(X, ymax) Next iEnd SubPrivate Sub btnNatisni_Click() Printer.CurrentX = 120 Printer.CurrentY = 220 PrintListView lvwList Printer.EndDocEnd SubThanks for your help!

Total Page Number In Excel Sheets forums.devshed.com

Hello folks!Does anyone have a clue how I can retrieve the total page number required for printing out an Excel sheet in VB/VBA ?I've got an Excel sheet, and I want to print out the current and total page number in the footer, but I want to print nothing in the footer, if the total page number is 1 ... so I have to retrieve this number before printing the sheet ...The only thing I have is the printing area I want to print out ...Thanks for any help Wolfgang

WMI Printer Management? social.msdn.microsoft.com

I am using vb 2005 and need help with trying to do the following :A Form that has a combo box , a listview and 2 command buttons( When the form loads ) i need the combo box to be enumerated with the printers that are on my server ( so will need to connect to my server which is obviously a remote machine ).Then when ever I select a printer from the combo box, it enumerates the listview with any print jobs that are in that printers que and I am able to select either one or multiple print jobs and click on the cancel print job button ( which will cancel any selected print jobs ) or click the cancel all button which will just delete any print jobs in that printers que.I know this is a lot to ask but even if I could just get an example of how to enumerate the printers into the combobox and get the listview to display the print jobs ( If any exist ) for that specific printer.That would be great.

Crystal Reports Printing www.codeguru.com

I have an unique problem.Ihave done a project for shopping mall.I am printing bill for the items purchased by the customer.when i give print command,it prints as i want.problem isIt should stop after printing the last line of the report as they are using paper rollIf the report is of 3 pages,it prints correctly(only if 3 pages are full)else if 3rd page is half then the rest of the page gets ejcted which i dont want.this is not predefined size .If u still want further clarification I can give u.this a challenge for cr/vb programmersplz help me in this

Crystal Reports Printing www.codeguru.com

I have an unique problem.Ihave done a project for shopping mall.I am printing bill for the items purchased by the customer.when i give print command,it prints as i want.problem isIt should stop after printing the last line of the report as they are using paper rollIf the report is of 3 pages,it prints correctly(only if 3 pages are full)else if 3rd page is half then the rest of the page gets ejcted which i dont want.this is not predefined size .If u still want further clarification I can give u.this a challenge for cr/vb programmersplz help me in this

Crystal Report Printing www.codeguru.com

I have an unique problem.Ihave done a project for shopping mall.I am printing bill for the items purchased by the customer.when i give print command,it prints as i want.problem isIt should stop after printing the last line of the report as they are using paper rollIf the report is of 3 pages,it prints correctly(only if 3 pages are full)else if 3rd page is half then the rest of the page gets ejcted which i dont want.this is not predefined size .If u still want further clarification I can give u.this a challenge for cr/vb programmersplz help me in this

Printing A Listview W/ The Grid www.vbforums.com

How would I go about printing a listview thats in report view along with the grid lines in the listview?ie:text|text|text--------------text|text|text

Printing Listview Contents www.vbcity.com

hi guys, how do i print listview contents? 

Web Forms :: Print Gridview With Javascript? forums.asp.net

i want to print my gridview from printer with javascript print method.there is no problem with them.i have two page first one main page and second one print page. print page for preview data and send printer. data listed in gridview in main page when user click print page button new page open which have only girdview with datas and print button. i want to send directly gridview to print page. i dont want to querry again for same data to database in print page.

Printer Just Feeds Out Paper Instead Of Printing www.vbforums.com

Hello to everyone viewing.I have a printing problem.My VB6 program has to print a list which comprises of a header, a few labels and the contents of a listview, the code I use is posted below.Most of the time this code works perfectly fine and prints the list as required but every now and again when I try to print the list, the printer just feeds out blank sheets out paper continuously and prints nothing.I have tried my program on 3 seperate computers with 3 different types of printer, they all print ok but all 3 just feed out paper occasionaly.Here is my code.Code:Private Sub cmdPrint_Click() 'Print ListView command Dim a As clsPrintLV Set a = New clsPrintLV 'Call Print Class module a.PrintListView ListView1 Printer.EndDoc MsgBox "The current list has been sent to the Printer.", vbInformation, "Print Manager"End SubOption ExplicitPublic Event MaxYReached(ByVal CurrentY As Double, ByRef oPrinter As Object, ByRef bRePrintHeader As Boolean)Public Event Progress(ByVal oNextListItem As ListItem, ByRef oPrinter As Object, ByRef bRePrintHeader As Boolean, ByVal lTotalLines As Long, ByRef bCancel As Boolean)Dim Page As IntegerPrivate mlFromX As LongPublic Sub PrintListView(lvListview As ListView, Optional ByVal oPrinter As Object, Optional ByVal bLines As Boolean = False, Optional ByVal bBlackAndWhite As Boolean = True, Optional ByVal MaxY As Double, Optional ByVal lFromX As Long) Dim oListItem As ListItem Dim oSubItem As ListSubItem Dim oColumnHeader As ColumnHeader Dim iCounter As Integer Dim lPrevY As Long Dim sCorrectPrintText As String Dim bRePrintHeader As Boolean Dim bCancel As Boolean MaxY = 15000 mlFromX = lFromX Set oPrinter = Nothing If oPrinter Is Nothing Then Set oPrinter = Printer End If With oPrinter .Font = lvListview.Font .FontSize = 10 Call PrintHeader(lvListview, oPrinter) .CurrentY = .CurrentY + .TextHeight(" ") + (.TextHeight(" ") / 2) For Each oListItem In lvListview.ListItems bRePrintHeader = False RaiseEvent Progress(oListItem, oPrinter, bRePrintHeader, lvListview.ListItems.Count, bCancel) If bCancel Then Exit For End If If bRePrintHeader Then Call PrintHeader(lvListview, oPrinter) End If Set oColumnHeader = lvListview.ColumnHeaders(1) lPrevY = .CurrentY .CurrentY = lPrevY .CurrentX = .CurrentX - oListItem.Width Select Case oColumnHeader.Alignment Case lvwColumnLeft .CurrentX = mlFromX + oListItem.Left + 550 'sets print distance from left for 1st column Case lvwColumnRight .CurrentX = mlFromX + oListItem.Left + oListItem.Width - .TextWidth(oColumnHeader.Text) - 120 Case lvwColumnCenter .CurrentX = mlFromX + oListItem.Left + ((oListItem.Width - .TextWidth(oListItem.Text)) / 2) End Select .ForeColor = IIf(bBlackAndWhite, vbBlack, oListItem.ForeColor) If oListItem.Width > 15 Then sCorrectPrintText = Trim$(oListItem.Text) If .TextWidth(sCorrectPrintText) > oColumnHeader.Width - 60 Then Do Until Not .TextWidth(sCorrectPrintText & "...") > (oColumnHeader.Width - 120) sCorrectPrintText = Mid$(sCorrectPrintText, 1, Len(sCorrectPrintText) - 1) Loop sCorrectPrintText = sCorrectPrintText & "..." End If Debug.Assert sCorrectPrintText = Trim$(oListItem.Text) oPrinter.Print sCorrectPrintText; 'Because of some weird bug there has to be oPrinter before this ' If i dont add the oPrinter i get a syntax error End If .CurrentY = lPrevY For Each oSubItem In oListItem.ListSubItems Set oColumnHeader = lvListview.ColumnHeaders(oSubItem.Index + 1) Select Case oColumnHeader.Alignment Case lvwColumnLeft .CurrentX = mlFromX + oColumnHeader.Left + 550 'sets print distance from left for sub item columns Case lvwColumnRight .CurrentX = mlFromX + oColumnHeader.Left + oColumnHeader.Width - .TextWidth(oSubItem.Text) - 120 Case lvwColumnCenter .CurrentX = mlFromX + oColumnHeader.Left + ((oColumnHeader.Width - .TextWidth(oSubItem.Text)) / 2) End Select .ForeColor = IIf(bBlackAndWhite, vbBlack, oSubItem.ForeColor) If oColumnHeader.Width > 15 Then sCorrectPrintText = Trim$(oSubItem.Text) If .TextWidth(sCorrectPrintText) > oColumnHeader.Width - 120 Then Do Until Not .TextWidth(sCorrectPrintText & "...") > (oColumnHeader.Width - 120) Or (sCorrectPrintText = "") sCorrectPrintText = Mid$(sCorrectPrintText, 1, Len(sCorrectPrintText) - 1) Loop sCorrectPrintText = sCorrectPrintText & "..." End If oPrinter.Print sCorrectPrintText; End If .CurrentY = lPrevY Next .CurrentY = .CurrentY + oListItem.Height If .CurrentY > MaxY Then oPrinter.NewPage Call PrintHeader(lvListview, oPrinter) .CurrentY = .CurrentY + .TextHeight(" ") + (.TextHeight(" ") / 2) End If Next End With oPrinter.Print "" oPrinter.Print "" oPrinter.Print "" oPrinter.CurrentX = 8000 oPrinter.Print "Outstanding Balance : £" & " " & frmOtstngAcc!lblBal.Caption oPrinter.EndDocEnd SubPublic Sub PrintHeader(lvListview As ListView, oPrinter As Object) Dim lPrevY As Long Dim oColumnHeader As ColumnHeader Dim sCorrectPrintText As String Page = Page + 1 With oPrinter 'Print Date .CurrentX = 490 .CurrentY = 2500 oPrinter.Print "Date : " & frmOtstngAcc!lblDate2.Caption 'Print Page number .CurrentX = 10100 .CurrentY = 2500 oPrinter.Print "Page : " + Str(Page) 'Print Insurance Company .CurrentX = 490 .CurrentY = 3000 oPrinter.Print "Company : " & frmOtstngAcc!cboInsCo.Text 'Print label Outstanding Accounts .CurrentX = 4500 .CurrentY = 3500 .FontUnderline = True oPrinter.Print "OUTSTANDING ACCOUNTS" .FontUnderline = False For Each oColumnHeader In lvListview.ColumnHeaders If oColumnHeader.Width > 60 Then lPrevY = 4000 'sets print distance from top Select Case oColumnHeader.Alignment Case lvwColumnLeft .CurrentY = 4000 ''sets print distance from top for 1st column header .CurrentX = mlFromX + oColumnHeader.Left + 550 'sets print distance from left for 1st column header Case lvwColumnRight .CurrentX = mlFromX + oColumnHeader.Left + oColumnHeader.Width - .TextWidth(oColumnHeader.Text) - 120 Case lvwColumnCenter .CurrentX = mlFromX + oColumnHeader.Left + ((oColumnHeader.Width - .TextWidth(oColumnHeader.Text)) / 2) + 900 End Select 'sets print distance from left for Date column If oColumnHeader.Width > 15 Then sCorrectPrintText = Trim$(oColumnHeader.Text) If sCorrectPrintText <> "" Then If .TextWidth(sCorrectPrintText) > oColumnHeader.Width - 120 Then Do Until Not .TextWidth(sCorrectPrintText & "...") > (oColumnHeader.Width - 120) Or (sCorrectPrintText = "") sCorrectPrintText = Mid$(sCorrectPrintText, 1, Len(sCorrectPrintText) - 1) Loop sCorrectPrintText = sCorrectPrintText & "..." End If oPrinter.Print sCorrectPrintText; End If End If .CurrentY = lPrevY End If Next 'Print Line Printer.DrawWidth = 8 oPrinter.Line (250, 4275)-(11200, 4275) End WithEnd SubPlease help me if you can.I've got to go out to work now so I wont be able to reply to any posts untill tommorow 12.00 GMTThanksSteve.

Printer Just Feeds Out Blank Paper www.vbcity.com

Hello to everyone viewing.I have a printing problem.My VB6 program has to print a list which comprises of a header, a few labels and the contents of a listview, the code I use is posted below.Most of the time this code works perfectly fine and prints the list as required but every now and again when I try to print the list, the printer just feeds out blank sheets out paper continuously and prints nothing.I have tried my program on 3 seperate computers with 3 different types of printer, they all print ok but all 3 just feed out paper occasionaly.Here is my code.Code:Private Sub cmdPrint_Click() 'Print ListView command   Dim a As clsPrintLV   Set a = New clsPrintLV 'Call Print Class module   a.PrintListView ListView1   Printer.EndDoc      MsgBox "The current list has been sent to the Printer.", vbInformation, "Print Manager"End SubOption ExplicitPublic Event MaxYReached(ByVal CurrentY As Double, ByRef oPrinter As Object, ByRef bRePrintHeader As Boolean)Public Event Progress(ByVal oNextListItem As ListItem, ByRef oPrinter As Object, ByRef bRePrintHeader As Boolean, ByVal lTotalLines As Long, ByRef bCancel As Boolean)Dim Page As IntegerPrivate mlFromX As LongPublic Sub PrintListView(lvListview As ListView, Optional ByVal oPrinter As Object, Optional ByVal bLines As Boolean = False, Optional ByVal bBlackAndWhite As Boolean = True, Optional ByVal MaxY As Double, Optional ByVal lFromX As Long)    Dim oListItem As ListItem    Dim oSubItem As ListSubItem    Dim oColumnHeader As ColumnHeader    Dim iCounter As Integer    Dim lPrevY As Long    Dim sCorrectPrintText As String    Dim bRePrintHeader As Boolean    Dim bCancel As Boolean          MaxY = 15000    mlFromX = lFromX    Set oPrinter = Nothing        If oPrinter Is Nothing Then        Set oPrinter = Printer    End If        With oPrinter        .Font = lvListview.Font        .FontSize = 10        Call PrintHeader(lvListview, oPrinter)            .CurrentY = .CurrentY + .TextHeight(" ") + (.TextHeight(" ") / 2)        For Each oListItem In lvListview.ListItems            bRePrintHeader = False            RaiseEvent Progress(oListItem, oPrinter, bRePrintHeader, lvListview.ListItems.Count, bCancel)                        If bCancel Then                Exit For            End If                        If bRePrintHeader Then                Call PrintHeader(lvListview, oPrinter)            End If                        Set oColumnHeader = lvListview.ColumnHeaders(1)            lPrevY = .CurrentY            .CurrentY = lPrevY            .CurrentX = .CurrentX - oListItem.Width                        Select Case oColumnHeader.Alignment                Case lvwColumnLeft                    .CurrentX = mlFromX + oListItem.Left + 550 'sets print distance from left for 1st column                Case lvwColumnRight                    .CurrentX = mlFromX + oListItem.Left + oListItem.Width - .TextWidth(oColumnHeader.Text) - 120                Case lvwColumnCenter                    .CurrentX = mlFromX + oListItem.Left + ((oListItem.Width - .TextWidth(oListItem.Text)) / 2)            End Select                        .ForeColor = IIf(bBlackAndWhite, vbBlack, oListItem.ForeColor)                        If oListItem.Width > 15 Then                sCorrectPrintText = Trim$(oListItem.Text)                                If .TextWidth(sCorrectPrintText) > oColumnHeader.Width - 60 Then                    Do Until Not .TextWidth(sCorrectPrintText & "...") > (oColumnHeader.Width - 120)                        sCorrectPrintText = Mid$(sCorrectPrintText, 1, Len(sCorrectPrintText) - 1)                    Loop                                        sCorrectPrintText = sCorrectPrintText & "..."                End If                                Debug.Assert sCorrectPrintText = Trim$(oListItem.Text)                oPrinter.Print sCorrectPrintText; 'Because of some weird bug there has to be oPrinter before this                                                        ' If i dont add the oPrinter i get a syntax error            End If                        .CurrentY = lPrevY                        For Each oSubItem In oListItem.ListSubItems                Set oColumnHeader = lvListview.ColumnHeaders(oSubItem.Index + 1)                                Select Case oColumnHeader.Alignment                    Case lvwColumnLeft                        .CurrentX = mlFromX + oColumnHeader.Left + 550 'sets print distance from left for sub item columns                    Case lvwColumnRight                        .CurrentX = mlFromX + oColumnHeader.Left + oColumnHeader.Width - .TextWidth(oSubItem.Text) - 120                    Case lvwColumnCenter                        .CurrentX = mlFromX + oColumnHeader.Left + ((oColumnHeader.Width - .TextWidth(oSubItem.Text)) / 2)                End Select                                .ForeColor = IIf(bBlackAndWhite, vbBlack, oSubItem.ForeColor)                                If oColumnHeader.Width > 15 Then                    sCorrectPrintText = Trim$(oSubItem.Text)                                        If .TextWidth(sCorrectPrintText) > oColumnHeader.Width - 120 Then                        Do Until Not .TextWidth(sCorrectPrintText & "...") > (oColumnHeader.Width - 120) Or (sCorrectPrintText = "")                            sCorrectPrintText = Mid$(sCorrectPrintText, 1, Len(sCorrectPrintText) - 1)                        Loop                        sCorrectPrintText = sCorrectPrintText & "..."                    End If                                        oPrinter.Print sCorrectPrintText;                End If                                .CurrentY = lPrevY            Next                        .CurrentY = .CurrentY + oListItem.Height                        If .CurrentY > MaxY Then                oPrinter.NewPage                Call PrintHeader(lvListview, oPrinter)                .CurrentY = .CurrentY + .TextHeight(" ") + (.TextHeight(" ") / 2)            End If        Next    End With            oPrinter.Print ""    oPrinter.Print ""    oPrinter.Print ""    oPrinter.CurrentX = 8000    oPrinter.Print "Outstanding Balance : £" & " " & frmOtstngAcc!lblBal.Caption    oPrinter.EndDocEnd SubPublic Sub PrintHeader(lvListview As ListView, oPrinter As Object)    Dim lPrevY As Long    Dim oColumnHeader As ColumnHeader    Dim sCorrectPrintText As String        Page = Page + 1        With oPrinter        'Print Date        .CurrentX = 490        .CurrentY = 2500        oPrinter.Print "Date : " & frmOtstngAcc!lblDate2.Caption                'Print Page number        .CurrentX = 10100        .CurrentY = 2500        oPrinter.Print "Page : " + Str(Page)        'Print Insurance Company        .CurrentX = 490        .CurrentY = 3000        oPrinter.Print "Company : " & frmOtstngAcc!cboInsCo.Text                'Print label Outstanding Accounts        .CurrentX = 4500        .CurrentY = 3500        .FontUnderline = True        oPrinter.Print "OUTSTANDING ACCOUNTS"        .FontUnderline = False                For Each oColumnHeader In lvListview.ColumnHeaders            If oColumnHeader.Width > 60 Then                                       lPrevY = 4000 'sets print distance from top                                Select Case oColumnHeader.Alignment                    Case lvwColumnLeft                        .CurrentY = 4000 ''sets print distance from top for 1st column header                        .CurrentX = mlFromX + oColumnHeader.Left + 550 'sets print distance from left for 1st column header                    Case lvwColumnRight                        .CurrentX = mlFromX + oColumnHeader.Left + oColumnHeader.Width - .TextWidth(oColumnHeader.Text) - 120                    Case lvwColumnCenter                        .CurrentX = mlFromX + oColumnHeader.Left + ((oColumnHeader.Width - .TextWidth(oColumnHeader.Text)) / 2) + 900                End Select 'sets print distance from left for Date column                            If oColumnHeader.Width > 15 Then                    sCorrectPrintText = Trim$(oColumnHeader.Text)                                        If sCorrectPrintText <> "" Then                        If .TextWidth(sCorrectPrintText) > oColumnHeader.Width - 120 Then                            Do Until Not .TextWidth(sCorrectPrintText & "...") > (oColumnHeader.Width - 120) Or (sCorrectPrintText = "")                                sCorrectPrintText = Mid$(sCorrectPrintText, 1, Len(sCorrectPrintText) - 1)                            Loop                                                        sCorrectPrintText = sCorrectPrintText & "..."                        End If                                                oPrinter.Print sCorrectPrintText;                    End If                End If                                    .CurrentY = lPrevY            End If        Next                'Print Line        Printer.DrawWidth = 8        oPrinter.Line (250, 4275)-(11200, 4275)    End WithEnd SubPlease help me if you can.I've got to go out to work now so I wont be able to reply to any posts untill tommorow 12.00 GMTThanksSteve.

Listview Print Error! www.vbforums.com

Can someone please help, and if possible explain in newbie language.Basically I want to print the contents of a listview. I have searched the forum and found lots of posts. I've taken some code which you can see below, but when I click the print button I get and error 'Object doesn't support this property or method'.VB Code:Dim listitem1 As ListItem   For Each listitem1 In ListView1      Printer.Print listitem1.Text      'Add code to print subitems   Next listitem1   Printer.EndDoc The 'FOR EACH' line is highlighted.Thanks everyone in advance.....

Printig Epson Printer ESC/P www.xtremevbtalk.com

I people I have this code to print using epson dot matrix printer. Code:Public Sub cmdPrint()Dim sPrinter As String sPrinter = "LPT1:" 'local printer Open sPrinter For Output As #1 Print #1, Chr$(27) & Chr$(64) 'ESC @ = initialize printer Print #1, "Page 1 - Line1" 'printing lines Print #1, "Page 1 - Line2" Print #1, "Page 1 - Line3" Print #1, "Page 1 - Line4" Print #1, "Page 1 - Line5" Print #1, Chr$(12) 'Form feed [FF]: page break (doesnt work!) Print #1, "Page 2 - Line1" Print #1, "Page 2 - Line2" Print #1, "Page 2 - Line3" Print #1, "Page 2 - Line4" Print #1, "Page 2 - Line5" Close #1 End SubI have problems with page break... it doensnt go to the next page, it just leave almost 5 lines blank....Anyone knows how to do this? Any code Example?I have EPSON ESC/P reference manual (http://support.epson.ru/products/man...0350/part1.pdf) and i have read it complete and i couldnt find a solution.Thanks in advanced!

How Can I Print The Modules/Form&#039;s Code From VB IDE www.vbforums.com

HelloI've tried for several days just simply print the Form & Module code from the VB6 IDE,by simply cliking the print Icon on the toolbar, but all I got from the printer were several blank pages, with the name of the module + page number like:"frmMain -3" at the upper left corner of the blank page(of course I've set the "current module" option box & the "code" checkbox, in the printing dialog box.is this the normal printing results???or did I do anything wrong ? Is there a proper & simple way to print code in VB6 IDE?Ofcource beside cutting & pasting to notepad ?maybe some add on, or plugin?Pls help...

Printtitlerows VBA CODE ..Need Desperate Help www.vbforums.com

I have several lists of data in an excel spreadsheet, when I print them out I need the top line of each page to contain headings.My problem is that printtitlerows will print the same header ON EVERY page, I want this header to change depending on what list is being printed at the time.eg if printer is currently printing list B then the header for this page should be B...printtitlerows only allows one heading to be printed, its VERY INFLEXIBLE..any help appreciated.gavin@Ballycastle.com

How To Cancel Printing Jobs www.xtremevbtalk.com

last thread i had asked about how to obtain the number of printed pages and i got it...but now i want to know is there anyway to cancel the printing..i got the number of pages after the print click..so there i can calculate the price for the printing..but i'ts only after the printing...so i have to cancel the printing if the price is larger than the price that had been limited.so i hope someone can understand my question and help me...thank you

Help Needed While Printing www.codeguru.com

Please help Me.I have a report to be printed on DOT Matrix printer. Is it possible to print to a DOT Marix printer without giving the Page Size?I am using the page size of 4 inch by 6 inch.The problem is the report will get data from Table(s), which may be either 1 or 2 or 3 or many. So, when the printing goes on, (I'm using continuous stationary) The first page may contain only 2 records, the second page may contain 10 records and so. During this process, after printing the first page which is containing only 2 records, it will print blank lines and then goes to second page. During this, the output will be very odd.Even though I have set the Top and Bottom Margin to 0, "it prints 1 blank line space in between the pages".Can anybody help me to avoid printing of unnecessary blank lines between the different pages. That is, in the report, there should be no blank lines which is given by the printer on its own because, the gaps which are required are given by the report.It is very much required.Thank You.

Printing Rich Text Box www.vbforums.com

After such an amazingly quick and polite response to my first question.I have 1 other question to ask.Im sending some direct print commands to the printer.printer.print "Header blah blah"printer.print ""printer.print "2nd Header blah blah"printer.print ""printer.print ""I then have a richtextbox with multiline = true which i want to print below these headers.i use this command - richtext1.SelPrint Printer.hDCbut this then prints the richtext box over the other headers which i sent direct to the printer.How do i resolve this by printing the rich text box contents half way down the A4 page?As stated in a previous topic im a novice and any help is really appreciated.Thanks again

Printing To 1/2 Size Of Short Bond Paper (Frustrating) www.vbforums.com

Hi there! I already have a code for printing and it's working fine.The code will print in one whole sheet of bond paper. I would like to use a continous form (8 1/2 x 5 1/2) which is half of 8 1/2 x 11 (short bond paper). I would like also that after printing, even if the printout is just one line of text, the printer should eject the paper up to the perforation area only.I came accross of a thread with the same problem but there was no reply to it.Below is my code for printing. Can someone help with this please?Code:Private Sub cmdPrintRpt_Click() 'Add a textbox(hidden) and set it Multiline=true (but no scrollbar) Dim i As Long Dim j As Long Dim strTmpDescArray() As String Dim pagenum As Long, pagecount As Long If lstRecords.ListItems.Count = 0 Then MsgBox "There's nothing to Print", vbInformation, ProgName Exit Sub End If CommonDialog1.CancelError = True ' Do this firstOn Error GoTo ErrHandler ' Only need one error handler Do If Not pagenum = 0 Then pagecount = pagenum pagenum = 1 'CommonDialog1.ShowPrinter Printer.FontName = "Arial" Printer.FontSize = 20 Printer.Orientation = vbPRORPortrait Printer.CurrentY = 720 'Top Margin of .5" Printer.CurrentX = 620 'Left Margin of .5" Printer.Print "Sales Report" Printer.FontName = "Courier New" Printer.FontSize = 11 Printer.Print Tab(60); "Date Printed: "; Date Printer.Print Tab(60); "Page " & pagenum & " of " & pagecount 'format as required' pagenum = pagenum + 1 ' new page not till end of page Printer.Print: Printer.Print Dim Pagelength%, BottomMargin%, TopMargin%, ThreeLines% Pagelength = 11 * 1440 BottomMargin = 1 * 1440 TopMargin = 0.5 * 1440 ThreeLines = 0.5 * 1440 'Print column headers Printer.CurrentX = 220 Printer.Print LeftAlignText(lstRecords.ColumnHeaders(1).Text, MAX_WIDTH_COL1) & _ LeftAlignText(lstRecords.ColumnHeaders(2).Text, MAX_WIDTH_COL2) & _ RightAlignText(lstRecords.ColumnHeaders(3).Text, MAX_WIDTH_COL3) & _ RightAlignText(lstRecords.ColumnHeaders(4).Text, MAX_WIDTH_COL4) & _ RightAlignText(lstRecords.ColumnHeaders(5).Text, MAX_WIDTH_COL5) & _ RightAlignText(lstRecords.ColumnHeaders(6).Text, MAX_WIDTH_COL6) & _ RightAlignText(lstRecords.ColumnHeaders(7).Text, MAX_WIDTH_COL7) & " " & _ RightAlignText(lstRecords.ColumnHeaders(8).Text, MAX_WIDTH_COL8) Printer.Print String(MAX_WIDTH_COL1 + MAX_WIDTH_COL2 + MAX_WIDTH_COL3 + MAX_WIDTH_COL4 + MAX_WIDTH_COL5 + MAX_WIDTH_COL6 + MAX_WIDTH_COL7 + MAX_WIDTH_COL8 + 1, "-") ' total 1 spaces in a line 'Print Data For i = 1 To lstRecords.ListItems.Count strTmpDescArray = FormatDescription(lstRecords.ListItems(i).ListSubItems(1).Text) For j = 0 To UBound(strTmpDescArray) ' print each line of desc in separate line If j = 0 Then 'print each text If Printer.CurrentY > Pagelength - BottomMargin Then '**** Printer.NewPage Printer.CurrentY = TopMargin pagenum = pagenum + 1 '**** need to do before printing 'Repeat the Heading every page Printer.CurrentX = 620 'Left Margin of .5" Printer.FontName = "Arial" Printer.FontSize = 20 Printer.Print "Sales Report" Printer.FontName = "Courier New" Printer.FontSize = 11 Printer.Print Tab(60); "Date Printed: "; Date Printer.Print Tab(60); "Page " & pagenum & " of " & pagecount 'format as required ' or put after new page if you want at top of page Printer.Print: Printer.Print 'Print Column Headers at every page Printer.CurrentX = 220 Printer.Print LeftAlignText(lstRecords.ColumnHeaders(1).Text, MAX_WIDTH_COL1) & _ LeftAlignText(lstRecords.ColumnHeaders(2).Text, MAX_WIDTH_COL2) & _ RightAlignText(lstRecords.ColumnHeaders(3).Text, MAX_WIDTH_COL3) & _ RightAlignText(lstRecords.ColumnHeaders(4).Text, MAX_WIDTH_COL4) & _ RightAlignText(lstRecords.ColumnHeaders(5).Text, MAX_WIDTH_COL5) & _ RightAlignText(lstRecords.ColumnHeaders(6).Text, MAX_WIDTH_COL6) & _ RightAlignText(lstRecords.ColumnHeaders(7).Text, MAX_WIDTH_COL7) & " " & _ RightAlignText(lstRecords.ColumnHeaders(8).Text, MAX_WIDTH_COL8) Printer.Print String(MAX_WIDTH_COL1 + MAX_WIDTH_COL2 + MAX_WIDTH_COL3 + MAX_WIDTH_COL4 + MAX_WIDTH_COL5 + MAX_WIDTH_COL6 + MAX_WIDTH_COL7 + MAX_WIDTH_COL8 + 1, "-") ' total 1 spaces in a line End If Printer.CurrentX = 220 Printer.Print LeftAlignText(lstRecords.ListItems(i).Text, MAX_WIDTH_COL1) & _ LeftAlignText(strTmpDescArray(j), MAX_WIDTH_COL2) & _ RightAlignText(lstRecords.ListItems(i).ListSubItems(2).Text, MAX_WIDTH_COL3) & _ RightAlignText(lstRecords.ListItems(i).ListSubItems(3).Text, MAX_WIDTH_COL4) & _ RightAlignText(lstRecords.ListItems(i).ListSubItems(4).Text, MAX_WIDTH_COL5) & _ RightAlignText(lstRecords.ListItems(i).ListSubItems(5).Text, MAX_WIDTH_COL6) & _ RightAlignText(lstRecords.ListItems(i).ListSubItems(6).Text, MAX_WIDTH_COL7) & " " & _ RightAlignText(lstRecords.ListItems(i).ListSubItems(7).Text, MAX_WIDTH_COL8) Else ' print spaces and corresponding line from strArryTmp Printer.CurrentX = 220 Printer.Print LeftAlignText("", MAX_WIDTH_COL1) & _ LeftAlignText(strTmpDescArray(j), MAX_WIDTH_COL2) & _ LeftAlignText("", MAX_WIDTH_COL3) & _ RightAlignText("", MAX_WIDTH_COL4) & _ RightAlignText("", MAX_WIDTH_COL5) & _ RightAlignText("", MAX_WIDTH_COL6) & _ RightAlignText("", MAX_WIDTH_COL7) & _ RightAlignText("", MAX_WIDTH_COL8) End If Next j Next i ' here is where to check if there is enough space for the 3 lines for the total ' then to print a new header if needed If Printer.CurrentY > Pagelength - BottomMargin - ThreeLines Then '**** Printer.NewPage pagenum = pagenum + 1 Printer.CurrentY = TopMargin Printer.Print Tab(60); "Date Printed: "; Date Printer.Print Tab(60); "Page " & pagenum & " of " & pagecount 'format as required ' or put after new page if you want at top of page Printer.Print: Printer.Print End If Printer.Print Tab(62); "--------- ---------" Printer.Print Tab(50); "Total "; RightAlignText(lblTotalSales, 15); RightAlignText(lblNetSales, 10) Printer.Print Tab(62); "========= =========" 'Printer.EndDoc 'if you want page number on last page, you will need to add the code for it here, 'set the currentY to position at the bottom of page If pagecount = 0 Then Printer.KillDoc 'MsgBox "killdoc" '**** Else Printer.EndDoc 'MsgBox "print" '**** End If Loop While pagecount = 0 ' lstRecords.ListItems.Clear 'Clear first the listview if it contains transaction' Call ClearFunction(frmSales, "TextBox") cmdClear.SetFocus' cmdPrint.Visible = False Exit SubErrHandler: If Err = 32755 Then 'Cancel was selected Exit Sub' Else' MsgBox "Please check Printer if properly connected or turned on", _' vbInformation, ProgName' Call msgError(Err) End IfEnd Sub

Printer Object - Multiple Pages www.xtremevbtalk.com

I did a search and came up with nothing that really pointed to what I wanted to.What I want is to be able to print multiple pages but with a twist. The twist being the first page I want it printed 1 copy, the second and third pages print out 4 copies and then the fourth page to print out 1 copy.Can this be done?Do I have to loop through the parts of my script that print out pages where I want to print out 4 pages? Or is there something like Printer.PrintCopies = 4 ? and then I can set it back to 1 when I get to the next page?Hopefully this makes sense.Psydeo'd:Code: ' Print 1 copy Printer.Print "Blah Blah" Printer.Print "blahblah" Printer.NewPage ' Print 4 copies Printer.Print "Blah 2 Blah 2" Printer.Print "Blah2Blah2" Printer.NewPage 'Print 1 copy Printer.Print "blah3Blah3" Printer.Print "blah 3 Blah 3" Printer.EndDoc

Printing Forms www.vbforums.com

Please help. I have a database populated form (all the data is in labels) and I'd like to print the form on letterhead. I have tried using: printer.print <label.caption> but the text prints out across the page in one long line. I've also tried: formName.currentx = 1440, formName.currenty = 2880, formName.printform - but I cannot get the image to move down on the printed page. Any help would be much appreciated.Thank you.

Printing VBA Help www.xtremevbtalk.com

Need to print Microsoft Visual Basic Help file (which is displayed when Help menu is clicked in VBE) with the same directory way it is available, say, complete list of the contents & topic wise; similar to a book.A command to print evrything in one go. One can select the topic & print but the page formatting, say setting marging, is not available, so the printed one is occupying almost the whole page & not good for filing.Can anyone guide?

Anyone Seen 'Report Sections Do Not Match Datasource' www.vbforums.com

Hi All,I am trying to send listview items to datareport so i can print them out, but i keep getting this error everytime i try to view the datareport at runtime. I am trying to print the reports in landscape. I have SP6 installed so thats not the problemWhere am i going wrong...? Alternatvily does anyone know how to convert this lovely bit of code to print listview items on multiple pages... This will be my alternative if the above doesnt help.VB Code:Private Sub mnuFilePrint_Click()    Printer.CurrentX = 1440    Printer.CurrentY = 1440    printer.orientation = 2    PrintListView ListView1     Printer.EndDocEnd Sub Private Sub PrintListView(lvw As ListView)Const MARGIN = 60Const COL_MARGIN = 240 Dim ymin As SingleDim ymax As SingleDim xmin As SingleDim xmax As SingleDim num_cols As IntegerDim column_header As ColumnHeaderDim list_item As ListItemDim i As IntegerDim num_subitems As IntegerDim col_wid() As SingleDim X As SingleDim Y As SingleDim line_hgt As Single     xmin = Printer.CurrentX    ymin = Printer.CurrentY     ' ******************    ' Get column widths.    num_cols = lvw.ColumnHeaders.Count    ReDim col_wid(1 To num_cols)     ' Check the column headers.    For i = 1 To num_cols        col_wid(i) = _            Printer.TextWidth(lvw.ColumnHeaders(i).Text)    Next i     ' Check the items.    num_subitems = num_cols - 1    For Each list_item In lvw.ListItems        ' Check the item.        If col_wid(1) < Printer.TextWidth(list_item.Text) _            Then _           col_wid(1) = Printer.TextWidth(list_item.Text)         ' Check the subitems.        For i = 1 To num_subitems            If col_wid(i + 1) < _                Printer.TextWidth(list_item.SubItems(i)) _                Then _               col_wid(i + 1) = _                   Printer.TextWidth(list_item.SubItems(i))        Next i    Next list_item     ' Add a column margin.    For i = 1 To num_cols        col_wid(i) = col_wid(i) + COL_MARGIN    Next i     ' *************************    ' Print the column headers.    Printer.CurrentY = ymin + MARGIN    Printer.CurrentX = xmin + MARGIN    X = xmin + MARGIN    For i = 1 To num_cols        Printer.CurrentX = X        Printer.Print FittedText( _            lvw.ColumnHeaders(i).Text, col_wid(i));        X = X + col_wid(i)    Next i    xmax = X + MARGIN     Printer.Print    line_hgt = Printer.TextHeight("X")    Y = Printer.CurrentY + line_hgt / 2    Printer.Line (xmin, Y)-(xmax, Y)    Y = Y + line_hgt / 2     ' Print the rows.    num_subitems = num_cols - 1    For Each list_item In lvw.ListItems        X = xmin + MARGIN         ' Print the item.        Printer.CurrentX = X        Printer.CurrentY = Y        Printer.Print FittedText( _            list_item.Text, col_wid(1));        X = X + col_wid(1)         ' Print the subitems.        For i = 1 To num_subitems            Printer.CurrentX = X            Printer.Print FittedText( _                list_item.SubItems(i), col_wid(i + 1));            X = X + col_wid(i + 1)        Next i         Y = Y + line_hgt * 1.5    Next list_item    ymax = Y     ' Draw lines around it all.    Printer.Line (xmin, ymin)-(xmax, ymax), , B     X = xmin + MARGIN / 2    For i = 1 To num_cols - 1        X = X + col_wid(i)        Printer.Line (X, ymin)-(X, ymax)    Next iEnd Sub ' Return as much text as will fit in this width.Private Function FittedText(ByVal txt As String, ByVal wid _    As Single) As String    Do While Printer.TextWidth(txt) > wid        txt = Left$(txt, Len(txt) - 1)    Loop    FittedText = txt Currently it prints beutifully on 1 page but if i have too many items in a listview it screws it up. It also screws up when the width of the listview exceeds the page size. Can anyone help please. Thank you all for your time.

Printing MultiPage UserForm www.xtremevbtalk.com

I have a MultiPage UserForm containing 3 pages of data. Can someone tell me if it is possible to print all 3 pages of the form on one printed page and if so, what be the code?I have a commandbutton on my UserForm called PRINT using the code Code:UserForm.PrintFormbut I can only get it to print whatever page of the UserForm is being displayed at the time.Any help would be appreciated.

Checkbox In MS Word www.vbcity.com

I need help on the following problem...I want a checkbox in MS Word that can select the pages to print in VBA codes.for example:Let's say I have 2 checkboxes1st checkbox prints pages 1-52nd checkbox prints pages 6-10if a user check the first checkbox then pages one to five of the document will print out. How can I achieve this in MS Word VBA code? thanks

When Clicked Print Button Again It Doesn't Print Page Again stackoverflow.com

I am having a small problem and i don`t know the reason. I set that 1- If you click Print button then print.php page will be printed automatically. 2- if you submit a form then print.php page will be printed automatically. Problem is on second option. Page gets printed automatically perfect but if i click Print button again it does not print the page again. I am using firefox. [Code...]

Open Print-preview Page Upon Clicking On Hyperlink? stackoverflow.com

Every browser has print preview command in their File menu I want to make "print" button on HTML page and upon clicking i want to open print preview page. is this possible? With this we can open print options <a href="javascript:window.print()">Print this page</a> but can we open print-preview page instead print options ?

ActionScript 2.0 :: Print Out 2 Different Objects On A Separate Sheet Of Paper? board.flashkit.com

I need to figure out how to print out 2 different objects on a separate sheet of paper with only 1 print button, a PRINT ALL button.Here is what I thought would work but not working, please help: Code: myBtn.onRelease = function() { trace(_global.timesPressed); if (_global.timesPressed == 0) { [Code]... I can get the first object to print if I take off +(couponReal2, "bframe") but I can get both to print. I need couponReal on one page and couponReal2 on a second page????

Print Line By Line www.xtremevbtalk.com

Hi allAm using the Printer.Print "This is the first Line"Printer.Print "This is the 2nd Line"Printer.Print "This is the third Line"Printer.Print "This is the fourth Line"Printer.Print "This is the fifth Line"Printer.Print "This is the sixth Line"printer.enddocThis works BUT I dont want to print all lines togetherI want to print first line to Dot Matrix printerThen when the second line is ready print it on the same pageThe above example only prints when all lines are complete.Then it sends a page breakHow can I print a single line, wait, when second line appears then print it ON THE SAME PAGE.Cheers

Print Preview Not Printing All Pages social.msdn.microsoft.com

I have a small program written in VB10 that allows me to enter checks and then print a deposit slip. The maximum number of checks per printed page is 32 so if I enter more than 32 two pages will print. I send the output to print preview and then, if everything looks OK, I will print from there. If there are two pages to print all the pages show up in print preview. However when I print, only the last page prints. I am printing two copies so I have one for the deposit and one for my records. One page prints fine: I get two copies of the page. If I have two pages to print then I get two copies of page two.

PrintForm www.codeguru.com

How can I use the command PrintForm to print a form on a sheet and then print something else ON THE SAME PAGE?for example:Form1.PrintFormPrinter.Print "asdfds"when I do this then the form is printed on one page and the text on another one. I would like to have them on the same page.thanx for your help,ds

Print On New Page www.xtremevbtalk.com

Hello i have 2 questions, my first one is how do i print to my printer?I think its something like Print.Printer but im not sure.For my second question: i know that there is a code that when i add it it will print automaticly to a new page on my printer even when the page isnt full yet. I thought it was something like Chr12 to print on a new page but i forgot what it was. Hope anyone can help me out here.

Form.PrintForm Form Doesnt Print Whole Form www.xtremevbtalk.com

Hi all,Im building a program that has a form that varies in length, and the form can be printed.The problem I am having is that if the form is over a certain length (I'm unsure of this length), the bottom of the form doesnt get printed.What I need to happen is that if a form exceeds 1 A4 page in length, the rest needs to be printed on a 2nd page, at the moment the program only prints approx. 3/4 of a page.Thanks for your time and consideration, and if you can help please do, it will be very much appreciated.MoJo

Blank Page &&amp; Page Footer Problem social.msdn.microsoft.com

hi i am very concerned about this problem in�my report. � to solve this problem i increased the�height �of page footer,blank page vanishes but the page footer is not� printing on� every page,it is only printing on 1 st page . � i am having probelm because the records from the dataset are more than the page limit , page break is there� but no footer is printing on the second page only blank space is there. � can u please help me out from this problem?? � �

Total Of Printed Page Number www.xtremevbtalk.com

i need help on how to find number of total page printed...for example i've printed microsoft word document and want to obtain the number of total pages printed..i try printer.page but the output is 1...i'm using shellexecute method and print from the commondialog option

Page Setup www.vbcity.com

Dear Friends,I m using Crystal Report for reports. Here i m making a note of report problem:If i print in Laserjet Printer the report is printing Page Header, Page Footer properly in all pages.If i try with Dot Matrix and with Continuous sheet, If i print one by one (page by page) then it is ok, but if i give command for more than one pages (continues sheet) then the Page header is not in proper location and going down and down from the second page onwards.hope one of u can help me to get rid of this problem.ThanksMani

Tractor Printer Feed Question www.xtremevbtalk.com

I am developing a program which prints to a Panasonic KX-P1121 Multi Mode Dot Matrix 24 Pin printer. Is there a way of printing to this type of devise that does not involve using a page feed. .I ask because I am printing labels on a continuous roll and no matter what I try, every so often I get a page feed, which throws out the printing alignment.If not, can I specify my own page length at design time, and if so, how do I code this.Any help would be appreciated.Mike

Printing(Skipping Lines) visualbasic.ittoolbox.com

I am printing using dos mode using shell comand in VB programnFirst I keep track of linesIn 1 page we can print 66 linesIn 1 page we will print 3 bills (22 lines)After each bill we will give eject control code in program(chr(12) for epson printers)But only some times whenever eject code is passed too many lines it skips(almost 1/2 page) and prints the next billIs it nessary that eject code should be passed at a particular line noPlease help me how to solve this skipping problemThANKS IN ADVANCE

Opening Saved Data To ListView www.vbforums.com

Could any please tell me how I can create some code to an Open button so that it opens up data from a previously saved data file and then puts the information into the listview in their previous positions. I have included the code that im using to save the data to a file so that it will make a little more sense. nb. the listview has 6 columns.Save code: Dim I As Long Open App.Path & "ClientInfo.dat" For Output As 1 For I = 1 To lvInfo.ListItems.Count Print #1, lvInfo.ListItems(I) & "|" & lvInfo.ListItems(I).SubItems(1) Print #1, lvInfo.ListItems(I) & "|" & lvInfo.ListItems(I).SubItems(2) Print #1, lvInfo.ListItems(I) & "|" & lvInfo.ListItems(I).SubItems(3) Print #1, lvInfo.ListItems(I) & "|" & lvInfo.ListItems(I).SubItems(4) Print #1, lvInfo.ListItems(I) & "|" & lvInfo.ListItems(I).SubItems(5) Print #1, lvInfo.ListItems(I) & "|" & lvInfo.ListItems(I).SubItems(6) Next I Close 1Any help at all would be much appreciated.ThankxgOtA

SQL Reporting :: RDLC Report: Mismatched Number Of Pages In View And Print? forums.asp.net

I have a problem while printing rdlc report (local). The number of pages of the report in viewer is fewer than that in the print. This leads to a problem while printing the report from - to a particular page. For eg: The report viewer shows 9 pages while viewing but when I go for print it prints 14 pages. The data is not lost but records from page 1 are transfered to page 2 while printing.

How To Setup A Print Option For Currently Displayed Records forums.asp.net

We have a report that displays 30 records per page..there needs to be print options on the page.. They want to have the ability to print ONLY the records currently on the page or the option to print ALL records for the report.. The print all is fairly easy, i can just present the same page with no page size and they can print it out. But not sure how to go about setting up a print this page only option.

Checking A Listview For Items www.vbforums.com

The validate event is not hte place to put a check like since, it will only get activated if the listview has had focus and then lost it. And I'm not even sure it will be fired it the listview doesn't contain any element, but besides that, I do belive this is the code your are looking for:[code]if me.listview.listitems.count = 0 then Debug.print "Listview contatins no elements"else Debug.print "Everything is all right."end if[/CODE}

Program That Queries An Sql Database Displays It In A Detailed Listview www.dreamincode.net

I have written a program that queries an sql database displays it in a detailed listview, no problems so far. The only problem I am running in to is when I got to print the listview. When I do a regular printdocument.print() It prints out the listview exactly how I have it set up to do so. Which is a title , then column headers, next comes the listview, and then a total of some the columns. When I do a printpreview everything looks great. When I click the print button within the printpreviewdialog only the Title, Column headers, and the totals print. [code]

OS X :: Wants To Print First Page Quickly From Safari forums.macrumors.com

how I can quickly print the first page I am looking at in SafariI cant seem to find an option to print page one of however many there are. I dont want to have to go:- Print>Preview>File>Print selected page>Print as five steps is far too long winded with the amount of printing I am dealing with every day.What I really need to do is to print Paypal invoices WITHOUT them going over to a second page and wasting ink/paper.

OS X :: Printing Instruction Manual In Duplex? forums.macrumors.com

I would like to print a copy of my Nikon D90 instruction manual which is saved as a PDF. I'm trying to figure out how I can print a booklet using the least amount of paper. My logic was to have two pages to one piece of paper. My printer cannot do automatic duplex so I would have to print using odds and then evens. Therein lies my problem � if I am printing odds it'll turn out that Page 1 & 3 are printed onto one page together. So how would I go about printing Pages 1&2 and then 5&6 etc and then when I do the manual duplex it would Pages 3&4 and 7&8 etc I'm not sure if I'm making sense but hope someone can help � it's 300 pages which I could then print on 75 pages. I have a Brother HL-2170W which allows for manual feed duplex (that's too hard with 300 pages) or using the odds and evens method.

Printing Selected Reocrds In Crystal Reports 8.5 www.vbcity.com

Hi,I am printing multicolumn page report using Crystal Reports 8.5. Four reports are printed per page, this works fine.The page is divided into four parts and on each part one report is printed.Now what I need is that suppose there are 500 reports to be printed then on the 1st part of the page (first section of the four section page) i need to print records from 1 - 125, then on the adjacent second part of the page I need records to be printed from 126 - 251, then on the third section from 252 thru 377 and on the fourth section from 378 thru 500, i.e. I will print 125 pages for 500 records (four records per page). The number of records is not constant and can grow or shrink. Need urgent help how to do this ??????Thanks in advance

DataReport Print Problem www.vbcity.com

Hello,When I print a report using a DataReport (VB6) sometimes the printjob stops. When I print a 10 pages report sometimes I can't print for example page 5, if I specify the printjob (1-4, 6-10) then there's no problem, but I can't print page 5 (print preview and data looks okay). If I specify to print 2 pages on one page then I have no problem. Is this a outlining problem? (known datareport bug?).ThanksFrankie

Printer Ejects Blank Page Before Printing Report? www.vbforums.com

I am using the Printer Object in VB6. When I go to print the report...a blank page is printed before the rest of the report. I simply want to print the report without that blank page. So, in the Procedure that Prints the page headers, I inserted a Printer.NewPage statement as the very first statement in the procedure. Unfortunately, it still prints a blank page. How can I eliminate the blank page printing?Thanks,

Msaccess 2002 Report www.vbcity.com

Hi all,I have a access 2002 database - i use a access report from within the database. how do set it up so it only prints odd numbered pages then i want to set it up so it only prints even numbered pages.The idea is there is 48 pages in the report which is grouped, i want to print on both side of my paper but i dont want to turn the pages over after the page is printed - so i thought if i print all the odds then i can take them, turn them over and then print all the evens..ThanksRegardsTonyEdited by - anthp on 11/23/2006 9:32:40 PM

CrystalReport www.vbforums.com

Does anyone knows crystalreport?I want to print a customer on One Page and then SKIP.I mean: one customner per page.Any Help?

How To Print In Landscape (VB2010) social.msdn.microsoft.com

I designed a listview inj VB2010 using a tutorial on the web. It has Add, Delete, & Edit buttons. I added a fourth button to print the contents of the listview but it only printed in Portrait. The code I used to try to print in lanscape is below. What needs to change? Private Sub btnPrevieworPrint_Click(ByVal [code]....

One User Cannot Print Webpage In IE While Others Can www.sevenforums.com

Of 3 users on Windows 7 system one is unable to print any web page within IE (V 9.05). Print Preview shows blank page. Print will print just a blank page. Both of the other users can print web pages from within IE just fine. Note the problem account is able to print web pages from Firefox, just not IE.

Printing Tabbed Record www.access-programmers.co.uk

Hi all! Going ga-ga over this, :eek: so please see if you can help! Access 2000 by the way. I've a really pretty form made up and it has 3 tabbed pages.Each page contains some fields which contain 'memo' data, so the entries in each field are pretty long. When I try and print the record e.g. File->Print->Print selected record...it just: a)prints the front page/tab, as opposed to the contents of all 3 tabbed pages b)Truncates the data in the memo fields...it seems to just print the image of what you see when you open the form up - rather than printing the actual content of each field. Similar thing happens when I try and print from datasheet view. Or from the table that the form feeds into. What am i doing wrong? Please help! :D

Report Footer forums.aspfree.com

How do I print a different page footer on different pages? Please help.

Plz Help Me On Printer.print Method www.vbforums.com

--help me--help me--help me--help me--help me--help me--help me--help me-- In vb6 how can i print a visual basic form using printer.print method or How i can print a vb form using printing dialog box. I try printform & printing dialog box but when i choose the printer the printer only set as a default printer. But the change of the printer not effect on printing. if i set the printer ink is low quality but that is not effect on the printing the printer print default settings. Plz send me a sample code how the user printing setting will work on printing visual basic form. Plz Help me.......--help me--help me--help me--help me--help me--help me--help me--help me--

Print Fit To Screen And In Landscape As Default Layout www.vbcity.com

hi,i have this code for printing the pic in my third party ocx.Printer.PaintPicture ChartViewer1.Picture, 1000, 1000, ChartViewer1.Width, ChartViewer1.Heightit works fine. What i want to do is to print it fit to page. whatever the output even if its not shown in the screen it must print the whole picture. and how do i make landscape as the default print layout. And finally to have a print previewbefore printing it. please help..  

Bidirectional Printing www.vbforums.com

hi pips.. is there a way to manipulate the printing in vb6 so that it prints in a birectional manner.. i've noticed that printing in vb6 is relatively slow and if youre going to generate a report that is about 50 pages.. it really takes some time.. unlike in dos printing, it prints quite fast cause it prints bidirectionally.. is there a way to do that in vb6? please help..

Print In Javascript www.sitepoint.com

I am using javascript function window.print to print a page. having a link on the page "print page" It is working fine. I need to set the print properties as default such as page format as "landscape" instead of portrait. Secondly my page contents are on the full page. that way while printing the content goes outside the page. how can i set the page size ?

DATA Report Printing www.vbcity.com

Hi everyone,  i have a query on printing datareports from VB.after i display the report i use the print icon in the report to print the report but hte printing alingnment is not right...it prints the first page right and the it does not use the page skip method..please suggest a solutin for this...after printg a page it continues to print in the same paper insted of skiping to the next one for next page..please reply asap

Web Forms :: Paging On Existing Print Option On Browser? forums.asp.net

I have a listview on the web page, which looks like a neat report. Like you know all web pages on IE have a print option on it or Print Preview. These are existing on the web page. When I click on it to print my page, which has two pages to print. The first page is fine, but the second page has a wide space right on top. How could I do paging settings to fix this space to go away? [code]....

Background Image Missing Using Window.print? www.webdeveloper.com

I have a web page that is using a background image:<BODY BGCOLOR=#FFFFFF BACKGROUND=#IMAGE_PREFIX#back01.jpg>I include a 'Print' link on tha page:<A HREF="javascript:window.print()">Click to Print This Page</A>When the page prints, the background image in not included. My IE settings are set - Make sure Print background images and colors is checked under Printing.

Print The PHP Manual forums.devshed.com

I want to print the PHP manual, but it's size makes it a bit prohibitive even with double sided printing. Does anyone know of a program that allows printing of .pdf files so that you can print more than one .pdf page per side? Or is there another version of the manual that would allow for 2-per-page or 4-per-page printing so as to make the manual not so unweildy at 1600 printed pages?

Question On Number Of Pages In My Report www.xtremevbtalk.com

Hi friends,I use this code to show the number of page in my report and my report is just one page. Could you please help me what part I made mistake that it shows I have15 pages reports!!! Since when I print it out it gives me 15 pages print out that one page is blank and the second page is the report and again one page blank and next page is the same report till up to the end....!!!!Many thanks for your help,ElaheI am using MSAccessCode========="Page " & [Page] & " of " & [Pages]

Prevent Page Ejecting In A Printer visualbasic.ittoolbox.com

Hi AllI am doin a project of printing some lines in a page ..The print command keeps coming ( after certain iterval ) & i need to keepprinting it line by line ( Dot Matrix Printer)In the program I am using a an API function "EndDoc"However this command will eject the page after printing the line.So after each line is printed (each single command from porgram) my page isejected & next line gets printed in another pageIs there any method i can print in same page witout it being ejected.thanks & regardsvipin

Printing Contents Of A ListBox (RESOLVED) www.vbcity.com

Got a question here about Printing the contents of a ListBox.On my Form I have a ListBox from which I need to print out the ListBox contents, it sounds simple but how do I get it to print across multiple pages, ie page break after say 50 lines.What I need is to count the number of items in the listbox, then print about 50 on the first page, then print 50 on the next page untill all items are printed.Cheers. Edited by - SKM on 12/31/2004 3:37:36 AM

PrintForm www.codeguru.com

how can I print a large form with the command "PrintForm"?. My form is quite big (it's height is larger than the screen height), but only the part of the form that's visible is printed. If I make the form smaller, then the whole form is printed, but it doesn't fill a whole page anymore. Basically, I just want to print some form on one whole page with the command "PrintForm".thanx for your help,ds

Is There A Way To Set PAGE Margins When Printing? www.vbcity.com

I have my form set to print landscape, but when I do, the form prints on the left most edge of the page. Is there anyway to "set" a print margin?Also, I have the form set to maximized size, but it still does not print across the whole page. I have approx. 2" on bottom and 3" on right of blank paper. Cannot find how to make form any larger on properties....Thx for ANY & ALL help!

Range (Area) Help!!! www.xtremevbtalk.com

I am trying to create a Macro in Excel which will allow me to print a selected range (which will also be stated in the Macro).For example,Printing A3:A25,B3:B25, F3:F25,G3:G25,H3:H25Even try to print this normally it prints 2 pages. One with A3:A25,B3:B25 and on the other F3:F25 etc.Is there a way to combine these cells to one page, with each cell side by side?Can anyone help? I am not sure how the CombinedRange or Union functions work.

Query A Printer For Duplex Capability www.xtremevbtalk.com

duplex property on printer object, how to know if printer is duplex capable? As defined in Microsoft help the duplex property can be set as follows.VbPRDPSimplex 1 Single-sided printing with the current orientation setting. VbPRDPHorizontal 2 Double-sided printing using a horizontal page turn. VbPRDPVertical 3 Double-sided printing using a vertical page turn. Does anyone know how to check whether the current printer is capable of duplex printing.

Duplex Property On Printer Object, How To Know If Printer Is Duplex Capable? www.vbforums.com

As defined in Microsoft help the duplex property can be set as follows.VbPRDPSimplex 1 Single-sided printing with the current orientation setting. VbPRDPHorizontal 2 Double-sided printing using a horizontal page turn. VbPRDPVertical 3 Double-sided printing using a vertical page turn. Does anyone know how to check whether the current printer is capable of duplex printing.

AJAX :: Print Always VisibleControlExtender On First Page Only forums.asp.net

From IE, on a page that has a AlwaysVisibleControlExtender, whenever our users print that page, it prints the AlwaysVisibleControlExtender panel on every single page. Ideally we'd like to have it print on the first page only. I have been able to use Css in order to get it to print on no pages, but I'd prefer if it were possible to get it to print on just the first page.

MacBook Pro :: Won't Work With Printing Wierd Symbols discussions.apple.com

i have an HP deskjet 895Cxi printer, and i just got my macbook pro this christmas, and i bought "Pages" instead mac's "Word", but when i print, it prints some of the things i had typed onto pages, but it prints only some words on the top of a page, and then prints wierd symbols onto the top of the pages. my document is half a pages and it prints 3 pages of wierd symbols on the top..? i tried restarting my computer but it did nothing. Information: MacBook Pro (2010, 13 inch) Mac OS X (10.6.6)

Printer Friendly Page bytes.com

I have a print button in PHP page which using javascript window.print() to print web page. However , when user click "print" , the print preview display that the page cut-off and alignment is out. Read on regarding the matter , and found that is not the issue of PHP . Some users recommend to me to use CSS and HTML to create printer friendly page. However my page is extension is in php , can i use CSS and HTML to create printer friendly page?

Listview - Help With Populating + Few Other Probs www.vbforums.com

hi1) I'm trying to populate a listview with some saved data, however, instead of adding a new row, the following is adding duplicate columns. I've searched through the forums and on the net, but still having trouble trying to find a solution.... Also:2) How do I go about being able to select a row from the listview? ... e.g. with a list box, just use listindex, but what do I use with a listview?3) How do I load a form, but keep it hidden? e.g. something like:form.showform.visible = false... but without ever becoming visible.Any help would be greatly appreciatedcheersHere's my code: (very simple code)Save Module:VB Code:' Define variableType Payroll    HoursTotal As String    GrossPay As String    Tax As String    NetPay As String    WeekStart As String    WeekEnd As StringEnd Type Global Pay(300) As PayrollGlobal TP As Integer Sub SaveData_Pay()'save to text fle named payroll.pay    Open App.Path + "payroll.pay" For Output As #1        Print #1, TP        For CP = 1 To TP            Print #1, Pay(CP).HoursTotal            Print #1, Pay(CP).GrossPay            Print #1, Pay(CP).Tax            Print #1, Pay(CP).NetPay            Print #1, Pay(CP).WeekStart            Print #1, Pay(CP).WeekEnd        Next CP    Close #1End Sub Sub LoadData_Pay()'load from text fle named payroll.pay    Open App.Path + "payroll.pay" For Input As #1        Input #1, TP        For CP = 1 To TP            Input #1, Pay(CP).HoursTotal            Input #1, Pay(CP).GrossPay            Input #1, Pay(CP).Tax            Input #1, Pay(CP).NetPay            Input #1, Pay(CP).WeekStart            Input #1, Pay(CP).WeekEnd        Next CP    Close #1End Sub Save Command Button:VB Code:Private Sub cmdSave_Click()      TP = TP + 1     Pay(TP).HoursTotal = lblHoursTotal.Caption    Pay(TP).GrossPay = lblGrossPay.Caption    Pay(TP).Tax = lblTax.Caption    Pay(TP).NetPay = lblNetPay.Caption    Pay(TP).WeekStart = DTWeekStart.Value    Pay(TP).WeekEnd = DTWeekEnd.Value        SaveData_Pay        '-----Follow sub-routine ListView    ListView    End Sub ListView Populate:VB Code:Private Sub ListView()     Dim item As ListItem       With ListView1        .FullRowSelect = True        .View = lvwReport                With .ColumnHeaders            .Add , , "Pay Date"            .Add , , "Gross ($)"            .Add , , "Tax ($)"            .Add , , "Net ($)"        End With           With .ListItems '''''----------I think the problem is with this:                       For CP = 1 To TP                Set item = .Add(, Pay(CP).WeekStart, Pay(CP).WeekStart)                item.SubItems(1) = Pay(CP).GrossPay                item.SubItems(2) = Pay(CP).Tax                item.SubItems(3) = Pay(CP).NetPay            Next CP '''''----------                    End With    End WithEnd Sub

PrintOut Question? forums.aspfree.com

How do I get the Print Range: SELECTION to print only specific pages? When I enter page from and page to it still prints the entire selection. If I use Print Range: Pages, and enter the page from and page to, it prints all records, not just the selection. Is there Visual Basic Code that can do it?