Results 1 to 4 of 4

Thread: Printing String from VB

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    72

    Exclamation

    I have been reading the other threads and have found many ways to print. Currenty I build a string then pass it to the Printer control

    -----------------------
    strmsgbuffer = "TEST"
    dlgPrint.ShowPrinter
    Printer.Print strMsgBuffer
    --------------------------
    this works fine, except that the job stays in the printer queue until the program is closed. This is not going to work. Does anyone have any ideas.
    Is there a way to force the printer queue to run the jobs pending.

    thanks ahead of time
    VB 6 Professional Edition

  2. #2
    Guest
    Use the EndDoc method.

    Code:
    strmsgbuffer = "TEST" 
    dlgPrint.ShowPrinter 
    Printer.Print strMsgBuffer 
    Printer.EndDoc

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    72
    thanks Megatron,

    that did it

    what does ENDDOC do anyways
    VB 6 Professional Edition

  4. #4
    Guest
    Enddoc terminates a print operation sent to the Printer object, releasing the document to the print device or spooler. Say the user presses enter to start a new page and keeps going, this will not allow a blank page.

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