Outlook Logon session Issue

C

cedric

Hi Guys,

i'm implementing the outlook activeX into my Application to manage
(add, modify and delete) contacts from "publics share" into Outlook
where Exchange can share contacts to all users. So far everything is
all right but for one case :

When i want launch the application by the schedule task with user
session Windows closed, My applicaton crash.

In fact, the problem from the LOGON method (MAPI session) which need
to
know the user in order to check the mail profile.

Can you point me in the right direction to lanch the application with
user session Windows closed?

Here a piece of my Code :

' Start Outlook.
' If it is already running, you'll use the same instance...
Dim olApp As Outlook.Application
Set olApp = CreateObject("Outlook.Application")

' Logon. Doesn't hurt if you are already running and logged on but
actually mine is closed
Dim olNs As Outlook.NameSpace
Set olNs = olApp.GetNamespace("MAPI")
olNs.Logon , , False, False

Software version : coding on the MAPI / Outlook XP / Exchange 5.5

This is my first attempt at using Exchange, so any examples would be
greatly appreciated.

Thanks

Cédric
 
E

Eric Legault [MVP - Outlook]

Everything is explained in the KB article linked below.

Summary:

The Outlook Object Model is unsuitable for use from an application designed
to be run as, or spawned by, an Windows NT service. This includes Active
Server Page (ASP) applications running under Internet Information Service
(IIS), and applications being run with the AT Scheduler or Task Scheduler
services.

Link:

Outlook object model is unsuitable to run in a Windows service:
http://support.microsoft.com/default.aspx?scid=kb;en-us;237913
 

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