Need help with objWord.Quit!

Results 1 to 3 of 3

Thread: Need help with objWord.Quit!

  1. #1
    Daniel78 Guest

    Default Need help with objWord.Quit!

    Hi, I need help with the following script. The script prints out a word document, the problem is that the Word application quits before the page i printed out! Thanks in advance<BR><BR>The script:<BR> Dim strDocPath, bolPrintDoc, objWord<BR> <BR> strDocPath = Request.QueryString ("FileName")<BR><BR> If strDocPath &#062; "" Then<BR> Set objWord = CreateObject ("Word.Application")<BR> objWord.Visible = FALSE<BR> objWord.Documents.Open strDocPath<BR><BR> &#039;If bolPrintDoc = "PrintDoc" Then<BR> objWord.PrintOut<BR> Response.Write "Ditt dokument skrivs nu ut...&#060;P&#062;"<BR> Response.Write "&#060;a href=&#039;print.asp&#039; target=""_main""&#062; Tillbaka &#060;/a&#062;"<BR><BR> <BR> objWord.Quit<BR> Set objWord = Nothing<BR> End if<BR> <BR><BR> <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Need help with objWord.Quit!

    just a suggestion, i&#039;m sceptical about it working, but still...<BR><BR><BR>try <BR><BR>if objWord.print then<BR>objWord.quit<BR>end if<BR><BR>if .print() returns a value, it&#039;ll return it after success, so it&#039;d work. however i don&#039;t know if it would work like that. try it though<BR><BR>j

  3. #3
    Daniel78 Guest

    Default RE: Need help with objWord.Quit!

    No, it didnt work!

Posting Permissions

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