Solved

Winword will not go away in Access

Posted on 2007-11-27
2
243 Views
Last Modified: 2013-11-28
I have an access application that contains an unbound object frame that shows a Word document.

When the form loads, the following code fills the unbound object frame successfully. This is the code that does that:

Dim WordApp As Word.Application

    Set WordApp = New Word.Application
    Me!OLEUnBound.SourceDoc = sTheCurrentDatabaseDirectory & "BlankDocument.doc"
    Me!OLEUnBound.Action = acOLECreateLink
    Me!OLEUnBound.Requery

On the OnUnload Event of the form, I have:
    Set WordApp = Nothing

After the access application ends, I still have numerous instances of WINWORD in the Task manager.

What am I missing?
0
Comment
Question by:LennyGray
2 Comments
 
LVL 17

Accepted Solution

by:
Chris Mangus earned 500 total points
ID: 20359628
You may want to add WordApp.Quit() before you destroy the WordApp object.
0
 
LVL 20

Expert Comment

by:clarkscott
ID: 20359805
You are dimming Winword in a procedure and setting it to nothing in another procedure.
Perhaps, since the object is not declared as a public, global, or in the form's declaration section,
the 'set to nothing' isn't doing anything.

Try placing the Dim WordApp As Word.Application in the form's declaration section.  


Scott C
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question