How to avoid security prompts in Visual Basic programs for Outlook
The components for work with MAPI
As a matter of fact, there is only one component worth talking
about in this section: Redemption by Dmitri Steblechenko
(www.dimastr.com). Currently, there
are no other components, and even the great SlipStick contains no other
references but to Redemption:
http://www.slipstick.com/outlook/esecup.htm
However, under request of a friend of ours, we've made a small component for easy reading on MAPI properties from Visual Basic for him. The component MAPIProp takes as little as 25 Kb on disc, and it is distributed for free together with the source codes in Visual C++ 6.0 and examples in JScript, VBScript, Visual Basic 6 and Visual Basic .NET. You can download the component from the following web-page:
http://www.mapilab.com/dev/mapiprop/
Besides the MAPI initialization functions, the component
contains methods for reading object properties, reading great-volume
values (like PR_BODY) and transparent reading of compressed
features (like PR_RTF_COMPRESSED). The component returns the property values in the ‘native’ form of Visual Basic, so you won't have to bother with converting ANSI-strings into a VB-string.
Though, what should one do, if, for example, one needs to get the list of message recipients? This list cannot be obtained through IMessage properties, as it exists as a separate table. One may
try using the function HrGetRecipientList, as described above, but working with complicated structures containing references is not a strong point of Visual Basic. So, the Redemption library is a reasonable solution.
The library, like OutlookSpy, is a shareware product, however, its capabilities are many times more capable than that of our own, assuming they can be compared at all.
Redemption offers alternative implementations for all
Outlook objects, where properties are locked by the security system. Thus,
for MailItem Redemption has SafeMailItem (whose methods are
not blocked by the security system), for ContactItem there is
SafeContactItem, etc. Besides, Redemption has a special
object MAPIUtils, which contains over a dozen of methods for work
with MAPI, including methods for reading and writing MAPI properties.
Redemption has been known for years and, like OutlookSpy, it
is a must-have product for any software designer intending to create
serious applications for Microsoft Outlook in Visual Basic.
|
|