?
Solved

Winword will not go away in Access

Posted on 2007-11-27
2
Medium Priority
?
247 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
Chris Mangus earned 2000 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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Suggested Courses

777 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