Dial Method [Outlook 2007 Developer Reference]

Switch View :
ScriptFree
NameSpace.Dial Method
Displays the New Call dialog box that allows users to dial the primary phone number of a specified contact.

Syntax

expression.Dial(ContactItem)

expression   A variable that represents a NameSpace object.

Parameters

NameRequired/OptionalData TypeDescription
ContactItemOptionalVariantThe ContactItem object of the contact you want to dial.

Example

The following Microsoft Visual Basic/Visual Basic for Applications (VBA) example opens the New Call dialog box.

Visual Basic for Applications
Sub DialContact()
    'Opens the New Call dialog
    Application.GetNamespace("MAPI").Dial
End Sub

The following Visual Basic for Applications (VBA) example opens the New Call dialog box with the contact's information. To run this example, replace 'Jeff Smith' with a valid contact name.

Visual Basic for Applications
Sub DialContact()
    'Opens the New Call dialog with the contact info
    Dim objContact As Outlook.ContactItem

    Set objContact = Application.GetNamespace("MAPI"). _
     GetDefaultFolder(olFolderContacts).Items("Jeff Smith")
    Application.GetNamespace("MAPI").Dial objContact

End Sub