Solved

MAPI CONTROLS IN VB 5.0

Posted on 1998-05-22
9
430 Views
Last Modified: 2008-03-03
When I use the signon method of a MAPISESSION control, I receive the error, "The profile name is not valid.  Enter a valid profile name", and "Microsoft Exchange" is the title of the message box.  If I click OK, I am directed to the Inbox Setup Wizard and asked to select the Information Services that I wish to use with Microsoft Exchange.  If I click CANCEL, I receive the 32003 Run-Time error, "Logon has Failed."

I am using an HPOPENMAIL server and Microsoft Mail, not Exchange.  Any thoughts?
0
Comment
Question by:dfhaines
9 Comments
 

Author Comment

by:dfhaines
ID: 1456932
Edited text of question
0
 

Author Comment

by:dfhaines
ID: 1456933
Edited text of question
0
 
LVL 2

Expert Comment

by:Jagar
ID: 1456934
VB MAPI controls have can only be used with a valid Microsoft Exchange Profile setup, you can not use the profiles setup in different programs.  I ran into this problem when I was running Outlook Express and got the same errors.
0
 

Author Comment

by:dfhaines
ID: 1456935
Jagar,

I will reopen this question for now...but if you can point to any documentation of your statement I will give you the points.  Also, if what you state is true, might you know of any controls that I could use in place of the standard VB issue MAPI controls?

David
0
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.

 

Expert Comment

by:dochopper
ID: 1456936
You say you use Microsoft Mail.  Is this on Windows95?  Is HPOPENMAIL the mail client?  If HP OpenMail is the client that you are usin, I believe you are out of luck with the MAPI Controls unless it "fakes" windows into thinking it is a mapi client.  I've never seen OpenMail, but I've email enabled lots of applications and it works great with the proper e-mail configuration.  Please provide more info about your setup.
0
 
LVL 4

Expert Comment

by:yowkee
ID: 1456937
dfhaines,
  If you are using VB5 with MAPI32, check out the help file with title "MAPISession Control". The note at bottom:
---------------
Note   If you attempt to run a program that uses the MAPI controls, make sure that you have the 32-bit MAPI DLLs installed properly or you may not be able to perform simple MAPI functions such as SignOn. For example, on Windows 95, you must install Exchange during the operating system setup, or install it separately from the control panel to correctly use MAPI functions or MAPI custom controls from Visual Basic.
0
 

Author Comment

by:dfhaines
ID: 1456938
Additional Information...
HPOPENMAIL is the server; Microsoft Mail v3.2 is the client.  I have installed 32-bit OPENMAIL DLLs.
0
 
LVL 5

Expert Comment

by:bin_huwairib
ID: 1456939
dfhaines,

This is usually happens when the LogonUI property of the MAPISession control is set to True and the UserName property of the control contains an invalid profile name.

Either set the UserName property of the MAPISession control equal to a profile name that exists on the machine before the SignOn method of the control is called, or leave the UserName property empty.
If the UserName property is empty and the SignOn method is called, a Choose Profile dialog box may appear. This dialog box contains all the profiles currently available.


Best regards
Bin Huwairib
0
 
LVL 2

Accepted Solution

by:
ndnet earned 200 total points
ID: 1456940
Try taking a look at the VBMail Example program.
To find it, go to Help Topics, go to Sample Applications, then Learning Edition and Professional Edition, then VBMail Sample.

Note: The help file also says that Microsoft Exchange is required for it to run.

One other possibility is your OS. If running NT, the sample app doesn't seem to work.
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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

861 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

25 Experts available now in Live!

Get 1:1 Help Now