_Folders.Add Method

Creates a new folder in the Folders collection.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
Function Add ( _
    Name As String, _
    Type As Object _
) As MAPIFolder
'Usage
Dim instance As _Folders
Dim Name As String
Dim Type As Object
Dim returnValue As MAPIFolder

returnValue = instance.Add(Name, Type)
[DispIdAttribute()]
MAPIFolder Add(
    string Name,
    Object Type
)

Parameters

  • Type
    Type: System.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.

Return Value

Type: Microsoft.Office.Interop.Outlook.MAPIFolder
A Folder object that represents the new folder.

See Also

Reference

_Folders Interface

_Folders Members

Microsoft.Office.Interop.Outlook Namespace

Other Resources

How to: Create a Custom Contact Item

How to: Add a Folder to the Folder List