BusinessCardView.Copy method (Outlook)

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

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

BusinessCardView Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.