Results 1 to 4 of 4

Thread: Printing Problem

  1. #1

    Thread Starter
    Hyperactive Member richy's Avatar
    Join Date
    Jan 1999
    Location
    Liverpool, England
    Posts
    353
    I'm doing a bulk mail merge where the program runs through a database, putting in the names and addresses of the people and then I would like to print them to the printer. My problem is that because the Mail Merge is so fast the printer doesn't seem to be able to get the data quick enough.
    The following is a cut down version of my code:

    Do
    'put the data into the document

    Printer.Print
    TXTextControl1.PrintDevice = Printer.hDC
    TXTextControl1.PrintPage 1
    Printer.NewPage

    DoEvents
    Data2.Recordset.MoveNext
    Loop Until Data2.Recordset.EOF

    For the putting of the data into the document I'm using the TXTextControl, but the problem is more to do with the printer I believe. Is there anyway of making sure that the data has been sent to the printer, a kind of DoEvents.
    A problem with my idea of the program being too fast is slightly snagged due to when I put a message box in to check this, the last record emerged from the printer and no others like normal.

  2. #2
    Guest
    try printing out only a couple of names to the printer
    to see if the printer is the problem...


  3. #3

    Thread Starter
    Hyperactive Member richy's Avatar
    Join Date
    Jan 1999
    Location
    Liverpool, England
    Posts
    353
    I've tried just doing two names, and also having a message box between these two names just to try and give it some time to sort itself out again.

  4. #4
    Addicted Member
    Join Date
    Mar 2000
    Location
    Netherlands
    Posts
    128
    I'm using this code in the project i'm working on and it works great.


    Printer.Print ""
    With Data3.Recordset
    book = .Bookmark
    .MoveFirst
    Do Until .EOF
    Printer.Print Tab; Tab; !Tijd; Tab; !Aktief; Tab; !Omschrijving;
    Printer.Print ""
    Printer.Print ""
    .MoveNext
    Loop
    .Bookmark = book
    End With
    Close 1
    Printer.EndDoc
    Remember Programmers don't sleep

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width