Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XADM: How to Embed an OLE Object in an Exchange Form


View products that this article applies to.

This article was previously published under Q160287

↑ Back to the top


Summary

This article shows you how to embed a bitmap image in a Microsoft Exchange Forms Designer Form RichEdit field by extending the form with Microsoft Visual Basic 4.0 16-bit version.

NOTE: Only the bitmap image (BMP) format is supported in the Exchange Forms Designer RichEdit field.

↑ Back to the top


More information

To embed a bitmap image in a Microsoft Exchange Forms Designer Form RichEdit field:
  1. First, the designer must create an Exchange Form using the Exchange Forms Designer.
  2. The form must contain one RichEdit field whose reference name is:
          MAPI_BODY_CUSTOM
    						
  3. Install the form to the appropriate folder or registry.
  4. Exit the Exchange Forms Designer and load the Formname.vbp file into Visual Basic 4.0 16-bit version.
  5. In Visual Basic, create a command button on the form panel.
  6. In Visual Basic, select the picture control (named Picture1 by default) and place that onto the form paneling.
  7. In Visual Basic, place the following code behind the command button created in step 5. In the first line of code, the LoadPicture method points to the path and file to find the bitmap image you want to load. In this example, "c:\exchange\current.bmp" is used.
          Picture1.Picture = LoadPicture("c:\exchange\current.bmp")
          Clipboard.Clear
          Clipboard.SetData Picture1.Picture, vbCFBitmap
          MAPI_Body_Custom_Ctrl.Action = 12  'RE_ACTION_PASTE
    						

    NOTE: For the recipient to successfully display the form bitmap image, the file will need to be available at the path specified in the LoadPicture method. This can be done by modifying the .CFG file, for the form project in the File#= entry. This entry is used to copy files locally, along with the form executable.
  8. Using the Exchange Client Forms Manager, install the form into the appropriate folder or library.

↑ Back to the top


Keywords: KB160287, kbusage

↑ Back to the top

Article Info
Article ID : 160287
Revision : 6
Created on : 10/28/2006
Published on : 10/28/2006
Exists online : False
Views : 311