Solved

Scheduling Outlook Application in VB

Posted on 2000-03-06
6
255 Views
Last Modified: 2010-05-02
I've got a VB program which creates an instance of an Outlook application:

dim ol as outlook.application
set ol = new outlook.application

When I schedule this command using NT Scheduled Tasks, and then log out, my program hangs on the above set statement.  Is there something in the environment I needs to set which will allow outlook to initialize?  This program works fine, interactively and in batch, as long as I'm logged into NT.  Outlook doesn't have to be running either.

I've also made sure that when I scheduled the task that I used my user ID and password which has administrative priviledges.

Any help appreciated.
0
Comment
Question by:cwirrgan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 

Expert Comment

by:neoabacus
ID: 2589707
I don't beleive that you can do this as outlook requires it to run in interactive mode.. IE: one must be logged in

this isdue to how profiles are configured in NT. when you are not logged in it does not have the correct NTuser,.dat file loaded into memory to read the mail profile in

what are you trying to accomplish via schedule??
0
 

Author Comment

by:cwirrgan
ID: 2591148
On a daily basis I run my program, at night, to send out reports to my group.  If you know a better way to send these emails, let me know and I'll give you the points.  So far, I would agree with your current conclusion about starting outlook while logged out.
0
 

Author Comment

by:cwirrgan
ID: 2591674
If this can be done through MAPI that would be great.  Or are we running into the same problem as we had with trying to create an Outlook session.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:neoabacus
ID: 2591755
is it a big deal to leave the machine logged in but locked??? if you could leave the machine in this state.. things would run fine...

to lock a nt machine hit ctrl-alt-delete then hit the enter key...
0
 

Author Comment

by:cwirrgan
ID: 2592085
I had been just locking my machine, but the System folks weren't real please with that.  I'm going with an approach that I've noticed in some of the other questions.  I'm using a Jmail class which basically allows me to send the email straight through SMTP.  

Since you were the only one who discussed the problem with me, and confirmed that I can't use Outlook when I'm not logged in, go ahead and lock the question and I'll award the points to you.

Thanks.
0
 

Accepted Solution

by:
neoabacus earned 100 total points
ID: 2592116
NP sorry i couldn't be of more help..

see above text.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question