Why multipule Instances of addin form in every outlook folder.

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

Why multipule Instances of addin form in every outlook folder.
Why multipule Instances of addin form in every outlook folder. 
Ashish Sinha




Posts: 51
Joined: 2011-03-29
Hi ,

I am using ADD-IN FORM in vs 2008 with Outlook 2010,2007 . But I am facing some problems:

1) I don't want to create instances for each outlook folders , I want create in only in one
specific folder like :"Advance-->Inbox".

2) using multipule instances of the Add-in form , I am not able to use keyboard
(Left-Right arrow keys) properly . as I am able to capturing the keys
(Left-Right) through Addmod.cs file from "Keycode" event , and I increasing/decreasing the value of variables based on keys value(Left-Right), but due to the multipule instances of the single form , variables value is being share with all other instances of the form and some time doesnot give correct output. So I need to craete only one instance of the form in one specific folder like: "Inbox->Advance".


Please healp me.




Thanks,
Ashish.
Posted 29 Mar, 2011 04:05:38 Top
Eugene Astafiev


Guest


Hi Ashish,

It looks like you need to set up the Cached property of the AddinExpress.OL.ADXOlFormsCollectionItem class. How did you configure an instance of the ADXOlFormsCollectionItem class for the form?

BTW What version and build number of Add-in Express do you use?
Posted 29 Mar, 2011 07:35:07 Top
Ashish Sinha




Posts: 51
Joined: 2011-03-29
Hi,

Thanks for your reply.

I am using Add-in-Express API (V. 603-b3052-vs-pre_1) Add-in Express 2010 for Microsoft Office and .NET, Premium.

And ,in adxOlFormsCollectionItem property I tried with followings property values:

1)None
2)NewInstanceForEachFolder.
3)OneInstanceForAllFolders

But I m facing this problem in all cases .Please help and give any demo link for this. and
my question is still same , I want create only one instance of the my form object in to one
specific folder as folder view I don't want to create multiple instances in each outlook folders, it create confusion to user.



Thanks,
Ashish.
Posted 03 Apr, 2011 00:57:34 Top
Ashish Sinha




Posts: 51
Joined: 2011-03-29
Hi Eugene ,

Please reply me I am waiting of your reply.





Thanks,
Ashish Sinha.
Posted 04 Apr, 2011 04:51:33 Top
Fedor Shihantsov


Guest


Hello Ashish,

To create an ADXOlForm for a particular folder, please set the FolderName property.
This property should contain the full folder path. For example: "Personal Folders\Indox".
If you use the FolderName property, you need to clear the ExplorerItemTypes property, otherwise the ADXOlForm will show up in a context specified by ExplorerItemTypes too.

Please note all context-sensitive properties (FolderName, FolderNames, ExplorerItemTypes, ExplorerMessageClass) are calculated using Boolean OR, not AND.

You can initialize the FolderName property in the
ADXOlFormsManager.OnInitialize event in the following way:

private void adxOlFormsManager1_OnInitialize()
{
   Outlook.NameSpace ns = OutlookApp.GetNamespace("MAPI");
   Outlook.MAPIFolder f = ns.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox);
   if (f != null)
   {
       adxOlFormsCollectionItem1.FolderName = f.FolderPath; 
   }
   Marshal.ReleaseComObject(ns);
   Marshal.ReleaseComObject(f);
}


Please see the http://www.add-in-express.com/files/projects/adx-x-ol-6-cs-forum_5_9079.zip

Please let me know if you have other questions.
Posted 04 Apr, 2011 07:15:23 Top
Ashish Sinha




Posts: 51
Joined: 2011-03-29
Hi Fedor,

Thanks a lot.

I got the solution from your sample project and it works here.





-Ashish
Posted 05 Apr, 2011 02:32:37 Top
Eugene Astafiev


Guest


Hi Ashish,

Good news! Thank you for letting us know.
Posted 05 Apr, 2011 05:00:54 Top