CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2001
    Location
    Wisconsin, USA
    Posts
    150

    MS Word Print Preview

    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?


  2. #2
    Join Date
    Jun 2001
    Location
    China
    Posts
    28

    Re: MS Word Print Preview

    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

  3. #3
    Join Date
    Jun 2001
    Location
    China
    Posts
    28

    Re: MS Word Print Preview

    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

  4. #4
    Join Date
    Oct 2001
    Posts
    2

    Re: MS Word Print Preview

    U can use word.application.visible property.


Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured