print not spooling completely

Results 1 to 2 of 2

Thread: print not spooling completely

  1. #1
    Join Date
    Dec 1969

    Default print not spooling completely

    Here&#039;s what happens.<BR>1. user has choice of 3 word documents to print.<BR>2. user clicks button to print desired file.<BR>3. user is prompted to click OK to print or CANCEL to quit.<BR>4. if user clicks OK then word application is opened and desired document is loaded.<BR>5. document spools to printer and prints<BR>6. document closes and word quits<BR><BR>The problem comes in with the spooling of the document, it isn&#039;t completely spooled before the application quits and thus only prints out the first few lines of the document.<BR><BR>Below is the code that I am using to manipulate the word application.<BR><BR>Dim MyDoc, MyPath<BR>MyPath = Server.MapPath(Request.ServerVariables("PATH_INFO" )) <BR>MyPath = Replace(myPath, "worddoc.asp", "affiliate.doc")<BR>&#039;Response.Write "MyPath: " & mypath <BR>Set MyDoc = CreateObject("Word.Application")<BR>MyDoc.Applicat ion.Visible = True<BR>MyDoc.Documents.Open MyPath<BR>MyDoc.PrintOut<BR>MyDoc.ActiveDocument.C lose wdDoNotSaveChanges<BR>MyDoc.quit wdDoNotSaveChanges<BR>Set MyDoc = Nothing <BR><BR>If I remove MyDoc.quit then the document spools and prints correctly, but I need to close the word application as soon as the printing is done. How can I get the print job finished before the word app closes? Or is there a better way to do this?<BR>Any help is greatly appreciated.<BR><BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: print not spooling completely

    my only thought is to maybe wait until the printing is done, the redirect the user to a page that closes the word application, then redirects them back to a page that you want them to be at.<BR><BR>mj

Posting Permissions

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