[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Winword will not go away in Access

Posted on 2007-11-27
2
Medium Priority
?
248 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

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…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

650 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