Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

WINWORD.EXE Process In Task Manager Doesnt Close

Hi all,

I've a program that read and write a microsoft word file from vb6. It works fine but after closing the file, the process in the task manager (WINWORD.EXE) doesnt close.

Here is how my code goes:
Private Sub Command1_Click()
Dim wApp As Word.Application
Dim wDoc As Word.Document
Dim wRange As Word.Range

Set wApp = CreateObject("Word.Application")
Set wDoc = wApp.Documents.Open(FileName:="c:doc1.doc")

' Do something here

Set wRange = Nothing
Set wDoc = Nothing
Set wApp = Nothing
End Sub
The process in the task manager shows that the WINWORD.EXE takes about 5x,xxxK of memory usage. And the worst thing is that every time i lunch the above code it will generate one WINWORD.EXE process, that means if i run the code 3 times it will use about 150,000K of memory. Is my way to close the file wrong?


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Winword.exe Stays In Process Tab Of Task Manager
Hi I have this code:

Dim objWordFile As Word.Document 'The MS Word File object
Dim objFileSys 'The File System object

If Right(strFileName, 3) = "doc" Then 'check if file is a doc
Set objWordFile = GetObject(strFileName)
Set objFileSys = CreateObject("Scripting.FileSystemObject")
objWordFile.SaveAs "C: emp.doc"
objFileSys.DeleteFile strFileName, True
objFileSys.MoveFile "C: emp.doc", strFileName
Set objWordFile = Nothing
Set objFileSys = Nothing
End If 'end check for doc

if I put in objWordFile.Close it tells me the application is no topen therefore cannot close. (or somethign along those lines) ie error message

Any ideas how I can kill this **** process? It eats memory like there's no tommorow!

Thanks in advance.


Close WinWord Process

How can I close winword.exe (taskmanager) from VB ?


How Do I Make It So A Program Doesnt Show In The Task Manager?
How do I make it so a program doesnt show in the task manager?

Task Manager / Process
I know how to get the program that is running under process to ehm Listbox... but i only get "blabla.exe"

May problem is that i whant the FULL path for exampel "C: ritrolabla.exe"

but i dont know how... please help

How To End Process From Task Manager
Hi folks,

My problem: I have a application that when the users close it, sometimes an instance still remains in the task manager, and when they try to reopen it, they get the "This application is already running" error. The app opens anyway but many of the controls on it behave incorrectly.

So I was wondering if there was a way to end the process from code. I've been searching here and other sites without luck so far. I have found several references to an api call to find a window. But that assumes the file is open and in the task bar.

I can tell if the app is running with the following code:
  If App.PrevInstance = True then
    ' need code to close the process
  End If

Just need the code to close the process.



"If at first you don't succeed, try, try again. Then quit. No use being a damn fool about it." --W.C. Fields


Edited by - bruha on 2/1/2006 1:43:57 PM

End Process In Task Manager
How to end excel exe process in task manager by using Visual basic code? if anyone knows please let me know...

Edited by - kmschitra on 2/1/2007 3:48:44 AM

Task Manager (process Tab) Control
I would like to ask what control was used for the Task Manager (process tab) interface. I am trying to simulate it by making a project to show system info and I would like to use that control. Thanks.

Process Left In Task Manager
I have this problem when I close the visual basic application with the 'x' button at the top right hand corner of the application. When I do that, the application will leave a process running in the background and will take up alot of memory and slow down the computer. I have another vba but it has no such problem. What can be the likely problems? I have quite a few forms for this problematic application. Is it due to the hiding of the forms or something? Please help coz I'm really lost....

Kill A Process In The Task Manager
how can i kill a process (end task) in the task manager from vb ?

Vb Control For The Task Manager (process Tab)
dear guys,
I'm new to this forum. I just want to ask what control was used for the Task Manager Process tab interface. It's like a data grid but it's not. I am working on a project about system info of a machine and I would like to use the control but I don't know what to use. Thanks.


Task Manager Stats For Process (i.e. Mem && CPU)
I have an application which creates multiple instances of an ActiveX EXE. I would like for the "Master" application to monitor & record the CPU & Memory utilization for each instance that is currently running.

Is there a Windows API that can provide this system information specifically for a single process ID or list of process IDs? I do not want to just store the overall utilization of the entire server.

Thanks for your help!!!!

How To Kill A Process From Task Manager
I want to kill a process from my task os is win 2000.
I made a setup project which makes use of microsoft outlook to get some values. When i try to install the setup,though the setup is completed my outlook.exe is still running in the task manager.
Now i want to kill the outlook.exe process from the task manager.
all other applications are closed while doing a setup.
any help??

XP > Task Manager > Ending A Process
I was wondering if there was a way i could end, Explorer.exe for example in the running processes in taskmanager.

Thanks ahead of time

How To Hide A Process In Task Manager
Does anybody know how to make a process invisible for task manager in windows 9x (maybe using API).

How To Hide A Process In Task Manager
i want that the user be unable to close my application. i've seen a few applications not showing up in the task manager when ctrl+Alt+del is pressed, i want to do the same.

Task Manager - Process I/O Read
hi,I want to read the status of Process I/O Writes bytes in Task manager using VB for the particular Process ID. How can we read the Process I/O writes using API and VB.

with best regards


Is It Possible To Change A Process Name In Task Manager?
is it possible to change a process name in task manager?

first of all, please DONT think that i am writing some kind of virus or something like that

my situation is, i am playing a online game, and it avoids users to "double running"
that means i cant play 2 accounts at the same time
by the way, i know the mathod of switching user in win xp and i just dont want to do that

and i guess, the game detects the running process to check if the game is already running before normal start
that's why it just end up the second one as soon as i run it

that's the reason i am trying to rename the running process

Kill Process In Task Manager
I've been making various virus/worm removal kits for a few friends and until now i've been terminating the virus/worms manually from the task manager. However, i'd like to be able to just run the removal instead of having to explain that they will have to kill it from the task manager before they run the removal. I'm guessing it's probably an API call or function but I have looked many times and nothing seems to catch my eye. Any suggestions?

Close Programs In Task Manager!
How can i close a program in the task manager?

Close Excell From Task Manager
Hi, need some help
Excell aplication won`t close from task manager - processes
Here is the code:

Dim objExcel As Excel.Application
Dim objWorkbook As Excel.Workbook
Dim objWorksheet As Excel.Worksheet

Set objExcel = GetObject("", "Excel.Application")
objExcel.Visible = False
Set objWorkbook = Excel.Workbooks.Open("c:close.xls")
Set objWorksheet = objWorkbook.Worksheets.Item(1)

objWorksheet.cells = "x"

Set objWorksheet = Nothing
Set objWorkbook = Nothing
Set objExcel = Nothing

Excel still remains opened until i stop the program

Excel Process Stays In Task Manager - With A New Twist...
I realize this problem has been discussed here in several threads as well as other places on the internet, but I think I may have a different problem with the same symptoms...

I am writing a program (using VB6) that will create an Excel spreadsheet, save it, then close Excel. Following is a code snippet showing how I'm opening and closing the Excel application:

Private Sub Generate_Excel_Template(fname As String)
Dim Ex As Excel.Application
Dim ExWB As Excel.Workbook

Set Ex = CreateObject("Excel.Application")
Ex.UserControl = False
Ex.DisplayAlerts = False

' Create the template file
Set ExWB = Ex.Workbooks.Add
ExWB.SaveAs (fname)
Ex.Visible = False

' do stuff here

' SaveAs...
ExWB.Close (True)

Set ExWB = Nothing
Set Ex = Nothing
End Sub

I have verified that there are no implicit references, i.e. I always use either "Ex." or "ExWB." when accessing Excel objects.

The program works fine, but upon exit, the EXCEL.EXE process remains in Task Manager.

Here's the twist. I have thus far run this program on three different machines, and the problem occurs on one PC, but not the other two. All are running Win2k with the latest Windows Updates. Of the two that work, one has VB Studio installed, the other does not (i.e. I'm running off the EXE file only). The VB Studio installations are both SP6. Excel 2000 is on all three machines.

Also, just for grins, I wrote a new project that simply creates the Excel object, adds a workbook, calls SaveAs, then quits (all exactly as in the above sample), and get the same results when I run it on the three PC's.

All this leads me to believe it's not a coding issue, rather a software or system configuration issue. Any ideas? I don't want to assume that my desktop machine is the only PC this will ever happen on, because as soon as I do, it'll come back to bite me in the bum...


How To List Process Names And PIDs Like Task Manager
How to get all the process names and IDs like Task Manager? Not only names/PID of the running applications. Thanks a lot.

Task Manager - Terminate Process - Access Denied
How do I make a program say "Access Denied" when I try to terminate it with Task Manager like ZoneAlarm? I'm creating a security program and I've been looking for the answer to this for a long time. Can some please give me a code to do this? Thanks

App Stays In Task Manager After Hitting X (close)
I created an small executable app. When I hit the 'Close' 'X' in the upper right corner of the form, the form goes away. However, when I go into the Task Manager, the app is still in the task list.

Is there a way I can assign "END" to the "X" (close) button? Or, perhaps I have some thing else wrong?

Thanks for the help,


How To Protect Process From Being Killed In Task Manager Or Anyother Software .

i need a little help ...

how can i protect my process from being killed in task manager or any other 3rd party software ?

for security reasons it 'll help to protect the program from unauthorized persons.

another thing , how can i hide my process without high cpu usage ?

i hide the process of my program but it takes too much cpu usage and also too much ram memory .

is there any solution for both problems .

thanx in advance for this help ..

How To Block User To End Task Our Program From Windows Task Manager....??
How to block user to End Task our program from Windows Task Manager....??

or other way is make the program disappear from the Windows Task Manager.........

Get Value Of "System Idle Process" In "Windows Task Manager" ?

Is their any way to get the "System Idle Value" the same value that we see in the "Windows Task Manager"

I need this value for my program, if this value is around 90 or above , my program can start , if it is below , I will put a message telling "That he need more resources" or something like that.

Thank you for your help

Best Regards,

Can The End Task Like Task Manager Does Be Implemented Using Vb RESOLVED
Can the end task (like task manager does) be implemented using vb

Equivalent To End Task Button In Task Manager?
The title says it all. What API is equivalent to End Task button in Task Manager?

Hiding A Task From Task Manager
How do I do that?

Thanx, Tadej

Anyone Know How To Setup A New Task In The Task Manager
Trying to install my exe, and then set it up as Scheduled Task.

Valid Solution is worth a 100% vote!

Ending A Process That Is Shown In Process Manager

I found the zip file in this thread:

and it works okay, BUT how do I close a non-system instance of csrss.exe? What's happening is a virus I'm making a deletion program for opens up itself with the name csrss.exe (deliberately having that name to seem like the system process).

Addin Manager Doesnt Have The Usual List
On my new machine, the addin manager only has two thingsin it...I need the pDW and its not on the list....

Task Manager
I dont want to Show My Programm in the Task Manager.
The User Can only Exit from the Application. Not from the END TASK

Task Manager
I was wondering if it's possible to put a listbox on a form, and have it retrieve ALL active processes on the computer and have a button that can be used to terminate the highlighted process.

Hopfully this is just something simple.

Task Manager
is it possible to load the Windows Task Manager from a form, i tried to use a API: TaskManager lib "user32.ll" or how ever it goes, like the lockworkstation one but i didnt work.

so how can you load Taskmanager?

Task Manager...
I want to be able to recieve the list of items on the task manager...

and kill certian processes that i tell it to...

now i dont know how to pull up the tasks running with VB

nor do i know how to kill other programs with VB

any help?

WithOut Task Manager...
How I can make program invisible in task manager??

Task Manager
How do I find out what programms (not nesseserely VB) are running on my computer. And also I need to find out their window caption. (to use in "AppCurrent" and then in "sendKeys")

Task Manager
how can i kill a exe in task manager

Task Manager
Hi, I'm working on a project to completely change the UI of windows using stardock programs, but some things cant be replaced by those. I want to make a talk manager with the look of Mac's "Force Quit" dialogue... but the functionality of the windows XP talk manager. I dont need to see my CPU % usage, just be able to end current tasks. I dont know if this is the right forum to post this, but I would greatly appreciate if someone could help me out!

thanks alot


Task Manager
I need to get the "Image Name" & "User Name" columns under the "Processes" tab. Is it do able?

App In Task Manager
hi there,

i have an application that uses some api calls (like dialog boxes of font, printer, etc). my prob is that when i call any of the dialog boxes, then tried to exit my application.. my application remains in the task manager which seems to be my prob coz i should run only one instance of my app..

pls help..



Don't Appear In Task Manager
I don't want that my program appear in task manager of windows xp. how can I?thanks!!!

Task Manager
I have developed an application say it "Shop". and have other independant applications say "Inventory", "Finance","Stores","Office". Now according to the need of the customer, i need to install, the wanted modules. For that i've made independent setup programs for each. All the setups can only be initiated by the master setup "Shop".Now, when one setup is running, i don't want other to start, if its icon is clicked by user.
I know how to track which application is running, that has been started by my application "Shop".
But, if the setup of "Inventory", fires another setup for third party component after terminating itself, than that setup program which is running is not under my control.

Let me put it simply, "how can i can access the status of each application that is running on system."

Help With Task Manager
When my program gets closed via task manager, it freezes and somtimes locks up the entire computer, forcing you to head for the switch. I need to fix that, either by making it not show up in the task manager at all, or make it so when the task manager attempts to close it, the program detects that and gracefully closes on its own.

Task Manager
Hello all,

Does anyone know how in VB6 you can check to see if an app is running on your system (i.e., WINWORD.EXE) and if it is, shut it down (and of course if not it does nothing)?


Task Manager
How can I make my app. to where it doesnt show up in the task manager.

Task Manager
I want to retrieve all and only the processes shown in task manager window when we press 'CTRL+ALT+DEL'.

How can I do this in VB?

Copyright 2005-08, All rights reserved