Outlook add-in stopped working

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

Outlook add-in stopped working
Does not run or load in the debugger but Outlook says it's there. 
Fedor Shihantsov


Guest


This continues to happen as follows:
1. I open an inspector from the calendar view;
2. Add-in loads my region (ADXOlForm);
3. My region has a non-null AddinModule property
4. I close the inspector
5. I Open a new inspector
6. My region now has a null AddinModule property.

ADXOlFormsManager does not cache ADXOlForm for Inspector. I.e. ADXOlForm is created every time when Inspector opens, old forms disposes.
Possible is it reason?
What Outlook version do you use?
Do you use the latest version (3.3) of Add-in Express 2007 for .NET?
Posted 27 Feb, 2007 03:20:13 Top
Gene Golovchinsky




Posts: 14
Joined: 2007-02-18
What is the recommended way to communicate between the add-in module and a region ADXOlForm? I couldn't see see form from the module, but could see the module from the form. So I hooked up some events on the module that the form subscribes to; the error I was getting was due to not unsubscribing to events.

Is there a better pattern for this sort of communication?

For the record, I am using version 3.2.904.2005. with VS 2005 and .NET 2.0.

Also, I saw several recommendations in this Forum for using the EntryID property of an appointment to identify it uniquely. When I tried doing this from my ADXOutlookItemEvents instance, the EntryID property was null in the ProcessOpen() method.

Under what circumstances is the EntryID defined?

Thanks again for your help,

Gene
Posted 27 Feb, 2007 11:44:29 Top
Fedor Shihantsov


Guest



What is the recommended way to communicate between the add-in module and a region ADXOlForm?
Is there a better pattern for this sort of communication?


Gene,

You can use the following code to access to ADXOlForm from AddinModule:
private void AddinModuleMethod() {
    for (int itemIndex = 0; itemIndex < adxOlFormsManager1.Items.Count; itemIndex++)
    {
        for (int formIndex = 0; formIndex < adxOlFormsManager1.Items[itemIndex].FormInstanceCount; formIndex++)
        {
            if (adxOlFormsManager1.Items[itemIndex].FormInstances(formIndex).Active)  
            {
                ADXOlForm1 form = adxOlFormsManager1.Items[itemIndex].FormInstances(formIndex) as ADXOlForm1;
                if (form != null)
                {
                    form.DoSomething();
                }
            }
        }
    }
}


BTW:
An active form in an advanced form region has Visible = true , Active = true An inactive form in an advanced form region has Visible = true , Active = false

Sergey Grischenko will answer to the second question.
Posted 28 Feb, 2007 06:42:44 Top