Click to See Complete Forum and Search --> : MS Word Print Preview


Spectre5000
October 12th, 2001, 08:48 AM
Good morning all you gurus! I have an application where I am generating a report. When the report has
been generated, I create a word document from vb, and then open the document in print preview (to allow
users to see what the report looks like in case they don't really want to print it). That all works fine,
but when the print preview screen closes Word stays open. What I want is for print preview to be displayed,
and then when the users closes the print preview, I want word to close completely, without asking if the user
wants to save the document that was created. How can I accomplish this?

Sam_Cheung
October 12th, 2001, 06:31 PM
Hi,
Could u use the quit method of word.application? I used to encountered this in excel, I succeeded, Let me know if it does not work. Good luck.

Sam

Sam_Cheung
October 12th, 2001, 06:39 PM
Hi,
Sorry,I forgot to tell you to decide saving or not before using quit method. That is : your word object.save:=false/true.

Sam

Vinay Chaudhari
October 15th, 2001, 12:34 AM
U can use word.application.visible property.