CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    VB OLE Automation

    Anyone know how to close an instance of Word from within VB? I am already setting my object variable to nothing but with no success.


  2. #2
    Guest

    Re: VB OLE Automation

    I have used the following code to Close the Document and Quit Word.
    fobj_Word is my Word Application. fobj_Doc is my Document



    set fobj_Word = CreateObject("Word.Application")

    set fobj_Doc = .Documents.Open(<filename&gt

    'Update fobj_Doc

    fobj_Doc.Close wdDoNotSaveChanges 'you can use other constants
    fobj_Word.Quit wdDoNotSaveChanges






  3. #3
    Guest

    Re: VB OLE Automation

    Just found Quit method on my own, but thanks for the reply !!!


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