命名空间-拨号方法 (Outlook)NameSpace.Dial method (Outlook)

显示 "新呼叫" 对话框, 使用户可以拨打指定联系人的主要电话号码。Displays the New Call dialog box that allows users to dial the primary phone number of a specified contact.

语法Syntax

expressionexpression. Dial( _ContactItem_ )

_表达式_一个代表NameSpace对象的变量。expression A variable that represents a NameSpace object.

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
ContactItemContactItem 可选Optional VariantVariant 要拨打的联系人的**ContactItem** 对象。The ContactItem object of the contact you want to dial.

示例Example

下面的 Microsoft Visual Basic for Applications (VBA) 示例将打开 "新呼叫" 对话框。The following Microsoft Visual Basic for Applications (VBA) example opens the New Call dialog box.

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

以下 VBA 示例将打开 "新呼叫" 对话框, 其中包含联系人的信息。The following VBA example opens the New Call dialog box with the contact's information. 若要运行此示例,请用有效的联系人姓名替换"Jeff Smith"。To run this example, replace 'Jeff Smith' with a valid contact name.

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

另请参阅See also

命名空间对象NameSpace Object

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.