DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Printing from Word

  1. #1
    joe Guest

    Printing from Word


    I have a program that accesses a word template and outputs formatted text
    to the template and prints using this syntax and it hangs when it prints.
    Once you hit cntrl+alt+delete and open task manager, it stops hanging and
    prints.Is there a better way? Thanks in advance, Joe

    objWord.ActiveWindow.Document.PrintOut

    Do While Objword.BackgroundPrintingStatus > 0
    frmPrint.Label1.Caption = "Print Document " & i + 1
    frmPrint.Refresh
    Loop

  2. #2
    Dean Earley Guest

    Re: Printing from Word

    Try putting a DoEvents just before the frmPrint.Refresh

    --
    Dean Earley (dean.earley@icode.co.uk)
    Assistant Developer

    iCode Systems
    "joe" <jfrey@pvcomm.com> wrote in message news:3c10cae6$1@147.208.176.211...
    >
    > I have a program that accesses a word template and outputs formatted text
    > to the template and prints using this syntax and it hangs when it prints.
    > Once you hit cntrl+alt+delete and open task manager, it stops hanging and
    > prints.Is there a better way? Thanks in advance, Joe
    >
    > objWord.ActiveWindow.Document.PrintOut
    >
    > Do While Objword.BackgroundPrintingStatus > 0
    > frmPrint.Label1.Caption = "Print Document " & i + 1
    > frmPrint.Refresh
    > Loop




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center