Udostępnij za pośrednictwem


How to: Add a Form Region to an Outlook Add-in Project

Applies to

The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office.

Project type

  • Application-level projects

Microsoft Office version

  • Outlook 2007

For more information, see Features Available by Application and Project Type.

Create a form region to extend a standard or custom Microsoft Office Outlook form by using the New Outlook Form Region wizard. You can create a new form region and design the user interface in Visual Studio, or you can import a form region that was designed in Outlook and add Visual Basic or C# code.

If you have an Outlook form region that you used in another Visual Studio Tools for Office project, you can reuse it in your current Outlook add-in project by using the Add Existing Item dialog box.

For more information, see Creating Outlook Form Regions.

To add a new form region to an Outlook project

  1. Open or create an Outlook 2007 add-in project in Visual Studio. For more information, see How to: Create Visual Studio Tools for Office Projects.

  2. In Solution Explorer, select the Outlook add-in project node.

  3. On the Project menu, click Add New Item.

  4. In the Add New Item dialog box, select Outlook Form Region.

  5. Type a name for the form region in the Name box, and then click Add.

    The NewOutlook Form Region wizard starts.

  6. On the Select how you want to create the form region page, select whether you want to design the form region by dragging managed controls onto a visual designer or import a form region that was designed in Outlook.

    Note

    If you choose to import a form region that was designed in Outlook, then you must specify the location of an Outlook Form Storage (.ofs) file. You cannot add managed controls to a form region that you design in Outlook; you can only add code behind the existing UI. For more information, see Creating Outlook Form Regions.

  7. On the Select the type of form region you want to create page, review the form region types and select one, and then click Next. For more information about form region types, see Creating Outlook Form Regions.

  8. On the Supply descriptive text and select your display preferences page, in the Name box, type a name for the form region. For the replacement and replace-all form region types, the Title and Description boxes are also available.

    For information about where the name, title, and description appear in Outlook when you deploy the form region, see Creating Outlook Form Regions.

  9. Select one or more display modes in which you want the form region to appear.

    All form region types can appear in Inspectors, in compose mode (for creating items) and in read mode (for viewing items). Adjoining, replacement, and replace-all form region types can also appear in the Reading Pane.

  10. Click Next.

  11. On the Identify the message classes that will display this form region page, select standard Outlook message classes or type the names of one or more custom message classes, and then click Finish. For more information, see Associating a Form Region with an Outlook Message Class.

See Also

Tasks

Walkthrough: Designing an Outlook Form Region

Walkthrough: Importing a Form Region That Is Designed in Outlook

Concepts

Accessing a Form Region at Run Time

Outlook Solutions

Creating Outlook Form Regions

Guidelines for Creating Outlook Form Regions

Custom Actions in Outlook Form Regions