Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB error "Type mismatch" 2 49
VBA saving file message display 5 56
VBA to copy paste columns form one file to other 20 85
vbModal 12 34
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 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…
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…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now