Solved

Winword will not go away in Access

Posted on 2007-11-27
2
240 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

862 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now