Share via


BusinessCardView.Apply Method (Outlook)

Applies the BusinessCardView object to the current view.

Version Information

Version Added: Outlook 2007

Syntax

expression .Apply

expression An expression that returns a BusinessCardView object.

Example

The following Visual Basic for Applications (VBA) example creates, saves, and applies a new BusinessCardView object.

Sub CreateBusinessCardView() 
 
 
 
 Dim objName As NameSpace 
 
 Dim objViews As Views 
 
 Dim objView As BusinessCardView 
 
 
 
 ' Get the Views collection of the Contacts default folder. 
 
 Set objName = Application.GetNamespace("MAPI") 
 
 Set objViews = objName.GetDefaultFolder(olFolderContacts).Views 
 
 
 
 ' Create the new view. 
 
 Set objView = objViews.Add( _ 
 
 "Card View", _ 
 
 olBusinessCardView, _ 
 
 olViewSaveOptionAllFoldersOfType) 
 
 
 
 ' Save and apply the new view. 
 
 objView.Save 
 
 objView.Apply 
 
 
 
End Sub

See Also

Concepts

BusinessCardView Object Members

BusinessCardView Object