More Outlook Resource Sites

Microsoft Developer Network (MSDN)

FAQs and other general resources

To Display a Picture on an Outlook Form

There are several ways to include pictures in any Outlook item. Beginning with Outlook 2003, the built-in contact form includes a picture control. However, this control is not available to Outlook form designers, although Outlook 2007 does provide a control for use in form regions (but not in legacy custom forms).

This page suggests alternative solutions for adding a picture to an Outlook form.

Picture in the Item Body

One obvious way to add a picture to an Outlook item is to copy and paste the picture from some other source into the body of the item. You also can use Insert | Object, unless you're working with a plain text or HTML message. The problem with this method is that the embedded picture object can hugely increase the size of the item. There is also no easy way to update the picture without editing the body of the item.

In an HTML message or post, you can use the Insert | Picture command. This doesn't have quite the overhead of a picture in an RTF item, but it does increase the size of the item somewhat.

The advantage of this method is that you can use it with any Outlook item, except plain text messages, without the need for a custom form.

Picture in an Image Control

An alternative method is to add an image control to a custom form and use the Advanced Properties of the control to set the Picture property to your preferred picture. (You can also add a picture to the background of the form itself by right-clicking on the form background and choosing Advanced Properties.) The problem here is that the picture becomes attached to the form, not to the individual item. This is a good method for adding a picture that you want to see on every item, but not for adding a picture that you want to be specific to each individual item.

If you want to use an image control on the form that loads a different picture for each item, you can use a little code to load the picture from a separate file when the form opens. Here's one way to set up the form and data:

  1. Create a form with a custom page named Picture and one image control on that page named imgPicture.
  2. Drag the Billing Information field from the Field Chooser to that page. (The Billing Information field is available on every Outlook item, and you can use it for whatever data you like.)
  3. Add the following code to the form:

  1. Publish the form.

When you create a new item with the form, be sure to type the location of the picture file you want to load into the Billing Information text box you added to the Picture page. That's how the form knows what picture to load.

A more sophisticated approach, which also has the advantage of being extremely low maintenance, is to use a rigid naming convention for the pictures so that you don't need to use the Billing Information field to store the name of the picture. You could use the Subject of the items, a unique ID you assign, or any other scheme you can devise.

Note that the new integrated picture control available in Outlook 2003 and later is not available to programmers. See Customizing Microsoft Outlook Contact Forms for more information.

Picture in a Browser Control

Another method is to put a web browser control on the form and use it to display a .gif or .jpg image. This might be the best method if you're trying to put the picture both on an Outlook form and in an intranet web page based on your contacts data. See: