ADX Folder Name Wildcard?

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

ADX Folder Name Wildcard?
 
Jason Coley




Posts: 272
Joined: 2005-05-26
Hi there,

When creating an pane addin for a folder, you must specify a default item type, ExplorerMessageClass or FolderName.

Is it possible to use a wildcard character in the folder name?

I would like my addin to be used on all folders called XYZ, regardless of what mailbox it is installed on. At present, i have to spcifically name the mailbox (data file) and then the path.

Maybe a path statement like {Data File}\Journal\XYZ or \Journal\XYZ would work better?

Also how does one use the ExplorerMessageClass? Never got this one figured out, and no examples that I can find?

Jason
Posted 30 Apr, 2007 18:38:17 Top
Jason Coley




Posts: 272
Joined: 2005-05-26
Just looking into the ExplorerMessageClass, if I have a journal folder, and the 'When posting to this folder, use' option is set to IPM.Activity.XYZ, this is not used when the MessageClass is checked, only the default message class, which would be IPM.Activity.

It would be much better if ADX checked the MAPI folder property PR_DEF_POST_MSGCLASS property and compared against this before checking against the DefaultMessageClass property in the object model. If this is done it allows a developer to create a folder, set the default item type and then the addin will be tied to that folder.

May be a better solution than the one I have described above with the wildcard FolderName.

Jason
Posted 30 Apr, 2007 19:01:37 Top
Fedor Shihantsov


Guest


Hi Jason,

Is it possible to use a wildcard character in the folder name?

You can use '*' to specify all folders.
You can not use other wildcard characters or '*' and folder name together.
Use the the adxOlFormsManager.ADXBeforeFormInstanceCreateEx event by the following way:

procedure TAddInModule.adxOlFormsManager1ADXBeforeFormInstanceCreateEx(
ASender: TObject; Args: TBeforeFormInstanceCreateEventArgs);
begin
if Pos('XYZ', args.FolderObj.Name) = 0 then begin
args.Cancel := true;
end;
end;

Also how does one use the ExplorerMessageClass? Never got this one figured out, and no examples that I can find?

ExplorerMessageClass corresponds to MAPIFolder.DefaultMessageClass.

P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 02 May, 2007 04:40:47 Top
Jason Coley




Posts: 272
Joined: 2005-05-26
if I use the method above, to have the '*' for the foldername, then add the BeforeFormInstanceCreateEx code, I get blank windows for all folders except the one I want the pane to show in. Surely this isn't the answer?

I do belive some form of wildcard on the foldername would be the easiest, well maybe not a wildcard, but a shortcut for the main folder like {Mailbox}\XYZ. I am sure your code could be modified easily enough to allow for this modification and would allow an easy way for developers to have their addin install on any system and work as required.

I guess the '*' method would kinda work if it didn't show the blank window, then the developer can get the mailbox text using the object model and then parse the whole text in the Pos statement ....

sMailboxName := GetMailboxName; //'Mailbox - Jason Coley'
if Pos(sMailboxName + '\XYZ', args.FolderObj.Name) = 0 then begin

The only problem with this is that I can see, is, this has to be done for every folder, but if the wildcard {Mailbox} was used, when the addin is loaded the {Mailbox} text replaced with the active Mailbox text then this is only done once for the duration of the addin lifetime.
Posted 03 May, 2007 17:46:39 Top
Fedor Shihantsov


Guest


Jason,

Thank you for the suggestion.
We will have to sleep with this for a while.
Posted 04 May, 2007 06:35:36 Top
nfsadx




Posts: 56
Joined: 2006-07-21
Hi,

Have you woken up from your sleep ;-) I have a similar problem to Jason. I need to be able to ensure that my AddIn only appears for non-public calendars.
Posted 16 Oct, 2007 11:08:40 Top
Fedor Shihantsov


Guest


Try get GetSharedDefaultFolder and compare Folder.EntryID in the BeforeFormShow event. (see the following linkhttp://www.outlookcode.com/codedetail.aspx?id=1066)
Posted 16 Oct, 2007 13:46:55 Top