Microsoft KB Archive/160287

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

Article ID: 160287

Article Last Modified on 10/28/2006

-

APPLIES TO


 * Microsoft Exchange Server 4.0 Standard Edition

-



This article was previously published under Q160287



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.



MORE INFORMATION
To embed a bitmap image in a Microsoft Exchange Forms Designer Form RichEdit field:  First, the designer must create an Exchange Form using the Exchange Forms Designer.  The form must contain one RichEdit field whose reference name is:

     MAPI_BODY_CUSTOM  Install the form to the appropriate folder or registry. Exit the Exchange Forms Designer and load the Formname.vbp file into Visual Basic 4.0 16-bit version. In Visual Basic, create a command button on the form panel. In Visual Basic, select the picture control (named Picture1 by default) and place that onto the form paneling.</li>  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. </li> Using the Exchange Client Forms Manager, install the form into the appropriate folder or library.</li></ol>

Keywords: kbusage KB160287

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.