Edit

Share via


_Folders.Add(String, Object) Method

Definition

Creates a new folder in the Folders collection.

public Microsoft.Office.Interop.Outlook.MAPIFolder Add (string Name, object Type);
Public Function Add (Name As String, Optional Type As Object) As MAPIFolder

Parameters

Name
String

The display name for the new folder.

Type
Object

The Outlook folder type for the new folder. If the folder type is not specified, the new folder will default to the same type as the folder in which it is created. Can be one of the following OlDefaultFolders constants: olFolderCalendar, olFolderContacts, olFolderDrafts, olFolderInbox, olFolderJournal, olFolderNotes, or olFolderTasks. The constants olFolderConflicts, olFolderDeletedItems, olFolderJunk, olFolderLocalFailures, olFolderManagedEmail, olFolderOutbox, olFolderRssSubscriptions, olFolderSentMail, olFolderServerFailures, olFolderSyncIssues, olFolderToDo, and olPublicFoldersAllPublicFolders cannot be specified for this argument.

Returns

A Folder object that represents the new folder.

Applies to