only one instance of form region is displayed

G

Guest

Hi,

I have created an Outlook 2007 form region with a managed add-in using the
sample in Microsoft's technical articles:

http://msdn2.microsoft.com/en-us/library/ms788695.aspx

Everything works fine. However, when I use VSTO 2005 SE to do exactly the
same thing I come across a problem. First instance of the form appears fine
but the when trying to display another form (of the same add-in) an error msg
comes up:

"The form region "TestRegion" cannot be opened. Outlook will use the default
Outlook form instead. The form region manifest specifies an add-in that is
not installed."

If I restart Outlook again the first instance comes up fine and the 2nd
brings up the error msg.

Any help welcome

Nikolas
 
S

Sue Mosher [MVP-Outlook]

Can you put in a breakpoint and step through the code to find the procedure where the error is occurring? I've been add-ins using Ryan's techniques without any problem.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Thanks for the quick reply.

I have tried to step through but it seems that the "problem" is in Outlook
code. I create a new mail item (olMailItem) with my custom message class and
I just use the mailItem.Display(false) function.
In the first instance everything goes fine, my form region class gets
initialised and all the functions of the FormRegionStartup interface get
called normally.
In the second instance, after the mailItem.Display(false) function my form
region class never gets initialised.

Nikolas
 
S

Sue Mosher [MVP-Outlook]

So you're saying that GetFormRegionStorage is not being called for the second item? Did you follow Ryan's complete instructions, including the state-handling class and a Region.Close event handler? DId you also follow the instructions in the VS 2005 SE documentation (the .doc that came with the download) to add a RequestService procedure? Is that also not getting called?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Well the trick was in the RequestService procedure. I just wasnt returning
the proper serviceGuid the 2nd time.

Thanks for the help, much appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top