Solved

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

Posted on 2000-03-21
3
263 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
[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 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

Technology Partners: 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!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

739 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