View.Copy (Outlook)

Creates a new instance of a View object.

Copy (Name, SaveOption)


Sub CopyView() 
 
 'Copies a view 
 
 Dim objViews As Outlook.Views 
 
 Dim objNewView As Outlook.View 
 
 
 
 Set objViews = _ 
 
 Application.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Views 
 
 'Create copy of View object 
 
 Set objNewView = objViews("New Table View").Copy(Name:="Table View Copy", _ 
 
 SaveOption:=olViewSaveOptionThisFolderEveryone) 
 
End Sub

Arguments

The following argument is required

Name (String) - Represents the name of the new View object.

Optional arguments

The following argument is optional

SaveOption (OlViewSaveOption) - The save option that defines the permissions of the View object.

Possible return values are olViewSaveOptionAllFoldersOfType - Indicates that the view is available in all folders of the same type, olViewSaveOptionThisFolderEveryone - Indicates that the view is only available in the current folder and is available to all users, olViewSaveOptionThisFolderOnlyMe - Indicates that the view is only available in the current folder and is only available to the current Outlook user.