Outlook hangs under Windows NT Task Scheduler 
Author Message
 Outlook hangs under Windows NT Task Scheduler

I have an Access application that sends email via Outlook. It works
perfectly when run from a PC on the network, or from the server when it is
run as an automatic task under the Task Scheduler. However, it only runs on
the server when I am logged into the server as Administrator at the time the
task is scheduled to run. If no one is logged into the server, the job
hangs.

I have traced the problem to the following code:

  On Error GoTo fnSendEmail_Error
  Set oOutl = New Outlook.Application
  Set oNS = oOutl.GetNamespace("MAPI")
  Set oMail = oOutl.CreateItem(olMailItem)

The job hangs on the last line. It does not trigger a jump to
fnSendEmail_Error.

Any suggestions as to the cause of the problem and how to fix it?

TIA,

--

John Green - Excel MVP
Sydney
Australia



Mon, 03 Nov 2003 07:49:15 GMT  
 Outlook hangs under Windows NT Task Scheduler
I should have specified Office 97 and Windows NT 4.0.

Also, the job is run using the Administrator account, which has full network
access,

--

John Green - Excel MVP
Sydney
Australia


Quote:
> I have an Access application that sends email via Outlook. It works
> perfectly when run from a PC on the network, or from the server when it is
> run as an automatic task under the Task Scheduler. However, it only runs
on
> the server when I am logged into the server as Administrator at the time
the
> task is scheduled to run. If no one is logged into the server, the job
> hangs.

> I have traced the problem to the following code:

>   On Error GoTo fnSendEmail_Error
>   Set oOutl = New Outlook.Application
>   Set oNS = oOutl.GetNamespace("MAPI")
>   Set oMail = oOutl.CreateItem(olMailItem)

> The job hangs on the last line. It does not trigger a jump to
> fnSendEmail_Error.

> Any suggestions as to the cause of the problem and how to fix it?

> TIA,

> --

> John Green - Excel MVP
> Sydney
> Australia



Mon, 03 Nov 2003 07:58:25 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. W2k Task-Scheduler -> find hanging tasks

2. How to add a task into Windows Task Scheduler from VB

3. VB and Task Scheduler Win NT

4. Task Scheduler running on NT

5. Programming NT Task Scheduler by using VB

6. VBA call to Windows Task Scheduler

7. VBA access to Windows Task Scheduler

8. Controlling the Windows Task Scheduler

9. Windows Task Scheduler

10. Add entry to Windows Task Scheduler from VB

11. Adding tasks in Windows Scheduler which should run only on selective months

12. Add a task to task scheduler

 

 
Powered by phpBB® Forum Software