Solved

Scheduling Outlook Application in VB

Posted on 2000-03-06
6
251 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
  • 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
ScreenConnect 6.0 Free Trial

Want empowering updates? You're in the right place! Discover new features in ScreenConnect 6.0, based on partner feedback, to keep you business operating smoothly and optimally (the way it should be). Explore all of the extras and enhancements for yourself!

 

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

770 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