 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Armani Guest
|
Posted: Fri Nov 21, 2003 5:57 am Post subject: Contact Email Address |
|
|
I am Trying to read the Email1Address field in the Contact but for
some reason no Success.
Here are the values from Outlook Spy
(*
Tag Sym: 0x8060
Tag Num: 0x8060001E
GUID: {00062004-0000-0000-C000-000000000046}
OOM: Email1Address
Kind: MNID_ID
ID: 0x8083 *)
here is the sample snippet of my code:
const
EMAILGUID: TGUID = '{00062004-0000-0000-C000-000000000046}';
var
MyPropTag: ULONG;
pTag: PSPropTagArray;
Names: array[0..0] of PMAPINAMEID;
Prop: array[0..0] of TMAPINAMEID;
EmailProperty: WideString;
pValue: PSPropValue;
hr: HResult;
begin
// I do the initializiation here....
EmailProperty := 'Email1Address';
with Prop[0] do
begin
lpguid := @EMAILGUID;
ulKind := MNID_ID;
Kind.lpwstrName := @EmailProperty[1]; //or use
PWideChar(WS)
end;
Names[0] := @Prop[0];
if S_OK = Msg.GetIDsFromNames(1, Names[0], MAPI_CREATE,
PSPropTagArray(pTag)) then
begin
MyPropTag := PT_STRING8 or pTag^.aulPropTag[0];
Hr := HrGetOneProp(Msg, MyPropTag, pValue);
if HR = s_OK then
begin
ShowMessage(pValue.Value.lpszA); // Display the
Value
MAPIFreeBuffer(pValue);
end;
end;
What else go wrong can anyone help me? Thanks in advance
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|