Solved

Mapi doesn't work when exchange/outlook session not running?

Posted on 2000-03-21
3
251 Views
Last Modified: 2013-12-25
My program reads and saves emails using mapi controls. But for me to run my program I have to have microsoft outlook or exchange running on my desktop. If I don't have a session running, the program doesn't work and gives error. How do I eliminate this problem?
thanks,
osho
0
Comment
Question by:osho121097
3 Comments
 
LVL 2

Expert Comment

by:brice123
ID: 2643405
Are you using the MAPI controls provided wihth VB6?

In this case, I suppose you are using a MAPI Session control. Try to set its NewSession property to true.

(The NewSession property specifies whether a new mail session should be established. If a valid session is already established, setting the NewSession property will allow two sessions to run concurrently).
0
 

Author Comment

by:osho121097
ID: 2648844
Yes, I am using Mapi with VB6. I tried your modification but still it doesn't work. Please let me know if you think there is any other reason. Thanks
0
 

Accepted Solution

by:
scrumper64 earned 50 total points
ID: 2692880
This works for me:

Mapi.DownloadMail = False
Mapi.NewSession = True
Mapi.LogonUI = False
Mapi.UserName = strLogonId
Mapi.Password = strPassword
Mapi.SignOn

It seems to ignore the password though, so set that to blank.  The password could be your problem, make sure the account can be opened OK without having to enter a password.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

809 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