Humberto Aicardi
Posts: 3
Joined: 2006-04-03
|
Hi,
I was using Turbo Power Office Partner to get access to Outlook Contacts Folder, is there a way to get access to this folder using Add In Express VCL? If so, how?
Regards,
Humberto Aicardi |
|
Dmitry Kostochko
Add-in Express team
Posts: 2887
Joined: 2004-04-05
|
Hi Humberto,
See the sample code below:
procedure TAddInModule.adxCOMAddInModuleAddInInitialize(Sender: TObject);
var
i: Integer;
IContact: _ContactItem;
IContactFolder: MAPIFolder;
begin
IContactFolder := OutlookApp.GetNamespace('MAPI').GetDefaultFolder(olFolderContacts);
if Assigned(IContactFolder) then
try
for i := 1 to IContactFolder.Items.Count do begin
IContactFolder.Items.Item(i).QueryInterface(IID__ContactItem, IContact);
if Assigned(IContact) then
try
// TODO
finally
IContact := nil;
end;
end;
finally
IContactFolder := nil;
end;
end;
|
|