Outlook 2007:- Form Regions not loading for VSTO 3.0 Add In

D

Dorell

Hi

I'm learning how to create Form Regions by following the MSDN article at
http://msdn.microsoft.com/en-us/library/bb226713.aspx but the form is not
loading when I try to debug the add-in. I've had some difficulties trying to
follow the article because I'm using VSTO 3.0 in VS 2008 but the article is
using VS 2005 with a custom template.

The add-in complies and runs, but no adjoining region appears when I open a
message. I have tested the GetFormRegionStorage and BeforeFormRegionShow
methods with Debug statements but nothing happens, so I'm assuming that
Outlook is not finding the FormRegionStartup interface. I have implemented
this interface in the ThisAddIn class instead of the Connect class in the
template. I have tried implementing the IDTExtensibility2 interface as
described in the article and nothing happens (Does the IDTExtensibility2
interface need to be implemented in a VSTO 3.0 add-in to load a form region,
or is only FormRegionStartup needed?)

I've checked the registry entry in the IPM.Note key that points to the form
region manifest file, and the addin element in the manifest file that
contains the key name of the add-in that contains the corresponding business
logic and FormRegionStartup interface, but didn’t find anything wrong.

Can anyone offer assistance, or point me in the right direction for
resolving the issue?

Regards,
Jason
 
K

Ken Slovak - [MVP - Outlook]

IDTExtensibility2 is used by you only if you are building a shared COM
addin, not a VSTO addin. VSTO actually handles that interface behind the
scenes and sends you the Startup() event after OnStartupComplete() finishes.

The interfaces for the form region should be handled automatically for you
with VSTO. In VSTO SE the calls are handled through overriding the
RequestService interface. If the Guid serviceGuid argument passed to you in
that override is typeof(Outlook.FormRegionStartup).GUID then you return the
ComVisible class that represents your FormRegionStartup handler.

I don't have anything for VSTO 3 or VS 2008, but I have VSTO SE samples for
VS 2005 that show how to do that at
http://www.slovaktech.com/outlook_2007_templates.htm.

For VSTO 3 I'd most likely just use the built-in handling for form regions
though. You can see samples for VSTO 3 Outlook addins at
http://www.outlookcode.com/, look on the home page there for various
samples.

BTW, no need to post your message 3 times in 4 minutes.
 

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