Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Closing WfW


Message #1 by "Peter Byers" <pb@s...> on Wed, 24 Jan 2001 08:46:30 -0000
Hi



 I have used the following fragment of code.



 Please will someone tell me the command to Close the "Word for Windows"

window that is created (the equivalent of clicking on File --> Exit)



Thank you - in anticipation (I hope)

Pete (Northolt UK)









Dim appWord

set appWord = Wscript.CreateObject("Word.Application")

appWord.Visible = True

filename = "d:\winword1\chelwish.doc"

appWord.Documents.Open(filename)

appWord.ActiveDocument.PrintOut()

appWord.ActiveDocument.Close()

Message #2 by "Wally Burfine" <oopconsultant@h...> on Wed, 24 Jan 2001 14:54:53 -0000
I think you can try:



appWord.Application.Quit True

Set appWord= Nothing



Wally Burfine



>From: "Peter Byers" <pb@s...>

>Reply-To: "ASP Web HowTo" <asp_web_howto@p...>

>To: "ASP Web HowTo" <asp_web_howto@p...>

>Subject: [asp_web_howto] Closing WfW

>Date: Wed, 24 Jan 2001 08:46:30 -0000

>

>Hi

>

>  I have used the following fragment of code.

>

>  Please will someone tell me the command to Close the "Word for Windows"

>window that is created (the equivalent of clicking on File --> Exit)

>

>Thank you - in anticipation (I hope)

>Pete (Northolt UK)

>

>

>

>

>Dim appWord

>set appWord = Wscript.CreateObject("Word.Application")

>appWord.Visible = True

>filename = "d:\winword1\chelwish.doc"

>appWord.Documents.Open(filename)

>appWord.ActiveDocument.PrintOut()

>appWord.ActiveDocument.Close()

>

  Return to Index