My Day with Form Regions and Custom Message Classes in Outlook 2007

I was creating a form region in Outlook 2007 today for appointments and I wanted to limit the form from showing up with every appointment. I read that you could associate the form region with a custom message class and once you did this the form region would only show up for messages of that type. So with that information in hand I marched through the New Outlook Form Region Wizard (see Figures 1–4) in Visual Studio 2008. I was trying to create an adjoining form region that would show up on the bottom of the appointment screen so when I got to “Select the form region you want to create” step (see Figure 2) I selected Adjoining and continued to “Identify Message Class that will show this form” step (see Figure 4) where I added my custom message class “IPM.Appointment.MyAppointment” and finished. After adding some content to my form region I started to debug my add-in. This is when the trouble began. I could not find my custom form anywhere. Normally you would go to File>New>Choose Forms… the form would be there (see Figure 5) ready for you to choose and enter data in. Not in this case. After a long process I finally figured out that a custom message class will only work with replacement and replace-all form regions and not adjoining which I was using. The note in the SDK (see Figure 6) hints at this but it doesn’t come out and say “It will only work with these types”.

FormRegionWizardStep1

Figure 1 – Selecting how to create your form region

FormRegionWizardStep 2

Figure 2 – Choosing the form region type

FormRegionWizardStep 3

Figure 3 – Naming your form region

FormRegionWizardStep 4

Figure 4 – Determining Message class to use

Choosing form

Figure 5 – Selecting form in Outlook

Note in sdk

Figure 6 – Note in SDK

Leave a Reply

Your email address will not be published. Required fields are marked *