ContactItem.AddPicture Method
Outlook Developer Reference |
Adds a picture to a contact item.
Syntax
expression.AddPicture(Path)
expression A variable that represents a ContactItem object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Path | Required | String | A string containing the complete path and filename of the picture to be added to the contact item. |
Remarks
If the contact item already has a picture attached to it, this method will overwrite the existing picture.
The picture can be an icon, GIF, JPEG, BMP, TIFF, WMF, EMF, or PNG file. Microsoft Outlook will automatically perform the necessary resizing of the picture.
Example
The following Microsoft Visual Basic for Applications (VBA) example prompts the user to specify the name of a contact and the file name containing a picture of the contact, and then adds the picture to the contact item. If a picture already exists for the contact item, the example prompts the user to specify if the existing picture should be overwritten by the new file.
Visual Basic for Applications |
---|
|
See Also