Outlook process not terminating via automation

D

David Gardiner

I'm trying to automate Outlook using the following C# code. When the
application finishes, an Outlook.exe process remains running.

I've read quite a few posts with similar problems, but as i'm setting
oApp to null, i'm not sure what else I can do. I tried using the
ReleaseComObject method but that doesn't seem to make any difference.

-dave

using System;
using Outlook = Microsoft.Office.Interop.Outlook;

namespace TimerTraveller2
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class Class1
{
public Class1()
{
}

/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// Create the Outlook application.
Outlook.Application oApp = new Outlook.Application();

oApp.Quit();

//System.Runtime.InteropServices.Marshal.ReleaseComObject(oApp);

oApp = null;
}
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top