Showing Recipient Properties
In Microsoft Outlook, the user can
right-click a message recipient to view that recipient’s
properties. Simple MAPI provides this feature through the
MAPIDetails
function.
MAPIDetails
causes MAPI to invoke the underlying
address book provider’s address entry dialog box. This allows
the user to display and modify the address entry properties
associated with a specified recipient. Here’s a sample call to
this function:
nRetVal = MAPIDetails(nMAPISession, 0, MyRecip, 0, 0)
The
MapiRecip
variable that is passed to
MAPIDetails
could be from one of the elements in
the recipients array of an incoming message. A sample address entry
properties dialog box is shown in Figure 3-8.
Figure 3-8. An address entry properties dialog box
MAPIDetails
is declared as follows:
Public Declare Function MAPIDetails Lib "MAPI32.DLL" Alias "BMAPIDetails" ( _ ByValSession
As Long, _ ByValUIParam
As Long, _Recipient
As MapiRecip, _ ByValFlags
As Long, _ ByValReserved
As Long _ ) As Long
Its parameters are:
-
Session
The session handle that was obtained in a previous call to
MAPILogon
. Alternatively, pass to cause MAPI to log on the user and create a session that exists only for the duration of the call. If necessary, a dialog box is displayed to request further logon information from the user.-
UIParam
The handle of the window that is to be considered the parent of any dialog boxes ...
Get CDO & MAPI Programming with Visual Basic: now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.