473,322 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Closing office apps with c#

This is probably something simple...
I'm trying to close a Powerpoint application from c# using:

PptApplication.Quit();
PptApplication = null;
GC.Collect();

I need all trace of the it to disappear immediatly, hence why I am calling
gabage collection, however it dosn't seem to disappear from the processes
list on task manager immediately (although if I wait around it does). Is
there a cleaner way to close powerpoint down?

Cheers
Nov 22 '05 #1
1 2745
You can use GC.WaitForPendingFinalizers() to be sure all finalizers have
completed before moving on
You can also terminate the process
Process.GetProcessesByName("powerpnt.exe")[0].Close() or .Kill() to stop the
process immediately

"Sean" <Se**@discussions.microsoft.com> wrote in message
news:36**********************************@microsof t.com...
This is probably something simple...
I'm trying to close a Powerpoint application from c# using:

PptApplication.Quit();
PptApplication = null;
GC.Collect();

I need all trace of the it to disappear immediatly, hence why I am calling
gabage collection, however it dosn't seem to disappear from the processes
list on task manager immediately (although if I wait around it does). Is
there a cleaner way to close powerpoint down?

Cheers

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Elephant | last post by:
Helllo, is there a version of Microsoft Office, where you can link .NET Dll's ( assemblies ) with it, instead of COM Dll's? If not, does anybody know when there will be? Thank you for any...
1
by: Sean | last post by:
This is probably something simple... I'm trying to close a Powerpoint application from c# using: PptApplication.Quit(); PptApplication = null; GC.Collect(); I need all trace of the it to...
1
by: John | last post by:
Hi I have office 2000 installed but in references I see office 10. The rest of the office apps are still 9.0. The problem is that when I send the compiled access app to clients who have office...
1
by: Jacques | last post by:
Hello, I'm creating an Office Add-in. The add-in works OK (I used the KB Article - 302901). The article states that you can change the add-in list of Office Apps by modifying the following...
1
by: John | last post by:
Hi It would be great to get some sort of managed code interface to whatever version of office apps are on the target machines, in vs2005. This is way a ..net app can check the version on the fly...
5
by: John | last post by:
Hi I need to call methods from office apps from my vb.net app. Some of my clients are still on office 2000 so to maintain compatibility I can not use office 2003 PIA. Can I avoid the whole PIA...
0
by: John | last post by:
Hi Is there a way to check for specific versions of individual office apps on the machine that is running the .net app e.g if word 2003 is installed or if excel 2002 is installed etc. Thanks...
1
by: mikejacobz | last post by:
Hi, I have an asp.net application (1.1) and when a user clicks on a link it opens up a word document. A user can then make changes to the doc and then close the document; My app needs to track...
4
by: John | last post by:
Hi I have an access app that uses word and outlook and both are referenced in the access app. The problem is that my client have outlook 2000 and word 2000 while my development machine has...
0
by: joeyshear | last post by:
I am very new to Python and would like to know how to use Python to open MS Office Documents (.doc .xls .txt)
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.