DoFolderAdd

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

DoFolderAdd
Running the AdxOLFoldersEvent Demo 
Marc Fisher




Posts: 11
Joined: 2005-05-21
Hi

I am trying to compile the AdxOLFoldersEvent demonstration as I need to hook into the folders to produce a popup menu item on a folder.

When I try to compile the demonstration I get a compiler error 'Incompatible types: parameters lists differ' in the adxOLFoldersEvents_IMPL.pas file at this line:

constructor TMyFolders.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Self.OnFolderAdd := DoFolderAdd; <---------- compiler error
Self.OnFolderChange := DoFolderChange; <------ compiler error
Self.OnFolderRemove := DoFolderRemove;
end;

It appears to relate to Outlook2000.pas

Can anyone help?

Other demos are fine and we have been using the excellent ADX VCL for years now and love it.

Running Delph6 plus all service packs and updates, latest build of ADX VCL

Regards

Mark.
Posted 26 Sep, 2006 18:10:04 Top
Dmitry Kostochko


Add-in Express team


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

See the code for Delphi 6 below:


  TMyFolders = class(TFolders)
  private
    function GetFolderObj: MAPIFolder;
  protected
    procedure DoFolderAdd(ASender: TObject; [B]var Folder: OleVariant[/B]);
    procedure DoFolderChange(ASender: TObject; [B]var Folder: OleVariant[/B]);
    procedure DoFolderRemove(Sender: TObject);
  public
    constructor Create(AOwner: TComponent); override;
    procedure ConnectTo(AFolder: MAPIFolder);
    property FolderObj: MAPIFolder read GetFolderObj;
  end;


Posted 27 Sep, 2006 02:43:47 Top
Marc Fisher




Posts: 11
Joined: 2005-05-21

Hi Dmitry

Thanks for the reply, although I can't get any of the D6 outlook demos to run straight out of the box if they reference folders, it seems the wizard creates the project with paramter differences between MAPIFolder and OleVariant.

As I can't compile them, can you tell me which demo to study for a popup menu when right clicking a folder in the PST?

Can you also advise what I need to do to get the demos working.

Many thanks for your help

Marc
Posted 27 Sep, 2006 06:39:33 Top
Dmitry Kostochko


Add-in Express team


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

As I can't compile them, can you tell me which demo to study for a popup menu when right clicking a folder in the PST?


I am afraid I do not quite understand what demo you need. Please contact me via email and describe the issue in more detail. I'll try to help.


Posted 27 Sep, 2006 12:22:07 Top
Marc Fisher




Posts: 11
Joined: 2005-05-21
Did you get my email? I sent it using the email form on this forum.

Marc
Posted 28 Sep, 2006 09:14:32 Top
Dmitry Kostochko


Add-in Express team


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

Yes, sure. And replied it.

I don't think your idea can be realized because:
- Outlook 2000 doesn't allow modifying its folder context menu;
- there isn't any way to detect which exactly folder was right-clicked;

So, I can suggest creating a custom command bar with some button/buttons instead of modifying the Outlook context menu.

Posted 28 Sep, 2006 09:27:55 Top
Marc Fisher




Posts: 11
Joined: 2005-05-21
OK, thanks Dmitry, will give that a go

Marc
Posted 28 Sep, 2006 10:12:34 Top