Board index » delphi » Outlook Calendar - mailbox access with Exchange

Outlook Calendar - mailbox access with Exchange

i have a client using Exchange.   i need to iterate all Outlook
mailboxes and create appointments in individual Calendar folders.

to test my access to the separate mailboxes, i use:

var
  i: integer;
  Outlook: OutlookApplication;
  NmSpace: NameSpace;
  Folder: MAPIFolder;
  myFolders: Folders;
begin
  Outlook := CoOutlookApplication.Create;
  NmSpace := Outlook.GetNamespace('MAPI');
  myFolders := NmSpace.Folders;
  for i := 1 to myFolders.count do
  begin
    Folder := myFolders.Item(i);
    GetSubFolders(Folder); <-- just iterates subfolders
  end;
end;

this code only returns the Public Folders (and subfolders) and my
Personal Folders (and subfolders).

i thought i had a permission problem but i have admin rights.  i even
gave Editor rights to myself in the Properties of individual Outlook
Calendars but still only my Personal Folders.

what am i doing wrong?

sher

 

Re:Outlook Calendar - mailbox access with Exchange


Use Namespace.GetSharedDefaultFolder() to access other users' folders. Use
Namespace.CreateRecipient() to create a recipient to be passed to
GetSharedDefaultFolder.

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

Quote
"Sher Hurlburt" <s...@forob.com> wrote in message

news:3EEF8E98.200EA621@forob.com...
Quote
> i have a client using Exchange.   i need to iterate all Outlook
> mailboxes and create appointments in individual Calendar folders.

> to test my access to the separate mailboxes, i use:

> var
>   i: integer;
>   Outlook: OutlookApplication;
>   NmSpace: NameSpace;
>   Folder: MAPIFolder;
>   myFolders: Folders;
> begin
>   Outlook := CoOutlookApplication.Create;
>   NmSpace := Outlook.GetNamespace('MAPI');
>   myFolders := NmSpace.Folders;
>   for i := 1 to myFolders.count do
>   begin
>     Folder := myFolders.Item(i);
>     GetSubFolders(Folder); <-- just iterates subfolders
>   end;
> end;

> this code only returns the Public Folders (and subfolders) and my
> Personal Folders (and subfolders).

> i thought i had a permission problem but i have admin rights.  i even
> gave Editor rights to myself in the Properties of individual Outlook
> Calendars but still only my Personal Folders.

> what am i doing wrong?

> sher

Other Threads