Binding to Generic Forms

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

Binding to Generic Forms
Stuart Murray

Posts: 26
Joined: 2006-09-14
I see from a previous posting that you can bind to forms using a path of the type:

"Mailbox - Ron\Contacts\Business\Companies"

The problem with this is that each users mailbox is named differently, so freds mailbox will be:

"Mailbox - Fred\Contacts\Business\Companies"

What I need to be able to do is bind to a relative folder something like:


Any idea how to achieve this? Alternatively if I have to do it on the fly,how do I do it?
Posted 14 Sep, 2006 13:57:19 Top
Stuart Murray

Posts: 26
Joined: 2006-09-14

I appear to have solved it. Basically you need to overload the AddinStartupComplete event and get the default folder programatically. My handler looks like:

private void AddinModule_AddinStartupComplete(object sender, EventArgs e)
    // Now figure out the 'named' folders people user

   String inbox = this.OutlookApp.Session.
   String prefix="\\";

   if (inbox.StartsWith(prefix))
       inbox = inbox.Trim(prefix.ToCharArray());

   String candidateFolder  = inbox + "\Candidates";
   this.adxExpCandidates_cb.FolderName     = candidateFolder;
Posted 14 Sep, 2006 15:28:04 Top
Sergey Grischenko

Add-in Express team

Posts: 7235
Joined: 2004-07-05
Hi Stuart.

Yes, correct.
Posted 14 Sep, 2006 15:30:28 Top