Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2000-03-21
3
Medium Priority
?
271 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 100 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
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…
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…
Suggested Courses

715 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