How to add tree item under Outlook Menu bar

Add-in Express™ Support Service
That's what is more important than anything else

How to add tree item under Outlook Menu bar
How to add tree item under Outlook Menu bar 
Chan Chi Keung


Guest


HI!

Is it possible using ADX to add tree under outlook bar ?

Thanks!
Posted 16 Feb, 2006 09:16:37 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Chan,

Please specify, do you mean Outlook Menu Bar (as in the topic title) or Outlook Bar (as in the post)? These are two different things, as you probably know.

Posted 16 Feb, 2006 09:41:11 Top
Chan Chi Keung


Guest


Sorry!

I need to create user defined subfolder to under inbox folder. Also, handle user defned subfolder or node to fill in list view.

Thanks!
Posted 17 Feb, 2006 08:15:34 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Chan,

You can create folder using the code like shown below.


procedure TAddInModule.adxCOMAddInModuleAddInInitialize(Sender: TObject);
var
  i: Integer;
  IFolder: MAPIFolder;
begin
  for i := 1 to OutlookApp.GetNamespace('MAPI').GetDefaultFolder(olFolderInbox).Folders.Count do
    if OutlookApp.GetNamespace('MAPI').GetDefaultFolder(olFolderInbox).Folders.Item(i).Name = 'Test' then begin
      IFolder := OutlookApp.GetNamespace('MAPI').GetDefaultFolder(olFolderInbox).Folders.Item(i);
      Break;
    end;
  if not Assigned(IFolder) then
    IFolder := OutlookApp.GetNamespace('MAPI').GetDefaultFolder(olFolderInbox).Folders.Add('Test', EmptyParam);
  if Assigned(IFolder) then
    try
      // TODO
    finally
      IFolder := nil;
    end;
end;

Posted 17 Feb, 2006 10:26:21 Top