Share via


BusinessCardView.Copy Method (Outlook)

Creates a new View object based on the existing BusinessCardView object.

Version Information

Version Added: Outlook 2007

Syntax

expression .Copy(Name, SaveOption)

expression An expression that returns a BusinessCardView object.

Parameters

Name

Required/Optional

Data Type

Description

Name

Required

String

The name of the new view.

SaveOption

Optional

OlViewSaveOption

The save option for the new view.

Return Value

A View object that represents the new view.

Example

The following Visual Basic for Applications (VBA) example creates a copy of a BusinessCardView object, named "New Card View", and saves it in the Contacts default folder. To run this example, you need to first create a BusinessCardView object named "Card View" either programmatically or by using the Microsoft Outlook user interface.

Sub CopyBusinessCardView() 
 
 
 
 Dim objName As NameSpace 
 
 Dim objViews As Views 
 
 Dim objNewView As BusinessCardView 
 
 
 
 ' Get the Views collection of the Contacts default folder. 
 
 Set objName = Application.GetNamespace("MAPI") 
 
 Set objViews = objName.GetDefaultFolder(olFolderContacts).Views 
 
 
 
 ' Copy the existing view. 
 
 Set objNewView = objViews("Card View").Copy( _ 
 
 "New Card View", _ 
 
 olViewSaveOptionThisFolderEveryone) 
 
 
 
End Sub

See Also

Concepts

BusinessCardView Object Members

BusinessCardView Object