View Single Post
  #4  
Old April 4th 06, 01:42 AM posted to microsoft.public.outlook.program_addins,microsoft.public.platformsdk.mapi
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Outlook extraction question.

I am not sure what GetMapiStringProperty function you mean, you are probably
mistaking me for somebody else :-)
In general, you don't need a new session as AddressEntry object in OOM
exposes a MAPIOBJECT property (evaluates to IAddrEntry object in MAPI).
1. Cast AddressEntry.MAPIOBJECT to MAPIdefs.IAddrEntry
2. Use HrGetOneProp to retrieve PR_SMTP_ADDRESS or
PR_EMS_AB_PROXY_ADDRESSES property
3. Read TSPropValue.Value.lpszA (in case of PR_SMTP_ADDRESS ) or
TSPropValue.Value.MVszA (in case of PR_EMS_AB_PROXY_ADDRESSES)
4. Call MAPIFreeBuffer to free teh memory (PSPropValue) returned by
HrGetOneProp.

If your code runs outaside of the outlook.exe address space (i.e. it is not
ta COM addin), you will need to wrap the sequence above into
MAPIInitialize/MAPIUninitialize.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Tom Andrecht" wrote in message
...
Ok, I think it's going to have to be Extended MAPI since some information
I found on the web says CDO isn't always installed with Outlook and the
budget doesn't allow the purchase of Redemption at this time. My next
problem is, I don't understand MAPI enough to know how to get at this
stuff. I have your MAPIServices file, but after looking through it, i'm
not sure exactly which pieces I need to create, or if I even have what I
need. If I'm thinking about this right, I need to create an IMapiSession,
a TMapiConnection, and item classes for the items i'm working with. Am I
thinking along the right lines? or would it be easier to use the
GetMapiStringProperty (or one of the other property access functions
included)? Unfortunately, I've been thrown into the middle of a project
someone else started, and I don't know enough about this technology yet to
be able to tell much about it, and the resources I've found have been
great for concept, but quite limited on implementation. Thanks for your
help.

Tom


"Dmitry Streblechenko" wrote in message
...
You will need to use Extended MAPI/CDO 1.21/Redemption to read the
PR_SMTP_ADDRESS (not available in the cached mode) or
PR_EMS_AB_PROXY_ADDRESSES property.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Tom Andrecht" wrote in message
...
I have a DLL I'm working on creating in Delphi that will let me extract
information out from calendar, contact, and email items, and for the most
part it works great. I'm working through an Exchange server, and I know
a lot of my clients also use Outlook with Exchang servers. Right now, I
can extract everything, but when I get the email address (Email1Address),
it returns the Exchange format(/0.../ou.../cn...) for any and all
exchange addresses, however, when I look at the address, I see it as SMTP
format (user@domain). Does anyone know How do I can get the exchange
format translated to SMTP? Outlook is great at translating it itself,
but they're not real forthcoming on how I can get it moved over to a
usable SMTP format for my program. Thanks for the help.







Ads