_MailItem.AddBusinessCard Method

Appends contact information based on the Electronic Business Card (EBC) associated with the specified ContactItem object to the MailItem object.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
Sub AddBusinessCard ( _
    contact As ContactItem _
)
'Usage
Dim instance As _MailItem
Dim contact As ContactItem

instance.AddBusinessCard(contact)
[DispIdAttribute()]
void AddBusinessCard(
    ContactItem contact
)

Parameters

Remarks

This method adds contact information, generated from the information stored in the ContactItem object, to the existing MailItem object. The information included depends on the value of the BodyFormat property for the MailItem object:

Property value

Result

olFormatPlain

A vCard (.vcf) file is created and added to the Attachments collection of the MailItem object.

olFormatRichText

A vCard (.vcf) file is created and added to the Attachments collection of the MailItem object.

olFormatHTML

An image of the business card is generated and included in the Body property of the MailItem object, and a vCard (.vcf) file is created and added to the Attachments collection of the MailItem object.

Note

The attached vCard file contains only the contact information included in the Electronic Business Card associated with the ContactItem object. Any contact information not displayed in the Electronic Business Card is excluded from the vCard file.

See Also

Reference

_MailItem Interface

_MailItem Members

Microsoft.Office.Interop.Outlook Namespace

Other Resources

How to: Send a Mail Item with an Electronic Business Card