Solved

Getting MAPI Profile in VB

Posted on 2001-07-02
3
345 Views
Last Modified: 2012-06-21
Hi,

I'm new to MAPI and I need help for the following :-

1. How do you detect that MAPI is installed in Windows?

2. Does anyone know how to obtain the list of all MAPI profiles from within Visual Basic?

Please provide sample code so that I can understand it more.

Thank you.
0
Comment
Question by:dinoang22
[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 5

Expert Comment

by:ianouii
ID: 6244394
usually, your windows will have the MAPI object once u have your microsoft office 2000 installed. else, u can always copy the MAPI.dll into it. put it at system32.

all the MAPI profiles can be obtained from MSDN. look for MAPI. if u want to obtain the very brief explanation within VB, just add a MAPI component onto your form.

double click on the MAPI icon, u should be able to see the mapsess and mapmess. they are two different things. highlight the word & press F2. u should be able to see all it's functions.

good luck.
0
 
LVL 16

Accepted Solution

by:
Neo_mvps earned 50 total points
ID: 6244810
You need to read the mail section in the win.ini file.  When mapi is installed, the entries will look something like:

[Mail]
MAPI=1
CMC=1
CMCDLLNAME32=mapi32.dll
CMCDLLNAME=mapi.dll
MAPIX=1
MAPIXVER=1.0.0.1
OLEMessaging=1

In order to read this section, you would use the GetProfileString API call.  This call is well documented at the Microsoft website and many, many VB websites on the net.


For part #2:
Since VB is not sophisticated enough to use Extended MAPI and the interfaces used to return a list of profiles, you would have to resort to reading the registry.  This section for tracking MAPI profiles varies between Win9x and NT/2000, but the general location of each is:

  * Win9x users
  HKEY_CURRENT_USER\Software\Microsoft\Windows Messaging Subsystem\Profiles\
  * WinNT users
  HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\

vbaccelerator.com has a great registry class for vb that will let you reitterate all keys of a given section.
0
 

Author Comment

by:dinoang22
ID: 6247272
Hi Neompvs,

Thanks for the information. It really works.

Cheers dude.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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
Course of the Month9 days, 7 hours left to enroll

623 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