PersonalStorage.CreatePredefinedFolder

CreatePredefinedFolder(string, StandardIpmFolder, bool)

Creates a standard Outlook folder, such as Inbox or Calendar, with the specified name.

public FolderInfo CreatePredefinedFolder(string name, StandardIpmFolder defaultFolder, 
    bool createHierarchy)
ParameterTypeDescription
nameStringThe name of the folder.
defaultFolderStandardIpmFolderWhich standard folder to create.
createHierarchyBooleantrue to treat name as a path separated by backslashes and create the folders that do not exist yet.

Return Value

The new folder.

Exceptions

exceptioncondition
NotImplementedExceptionThe PST is in the ANSI format, which cannot be edited.

See Also


CreatePredefinedFolder(string, StandardIpmFolder)

Creates a standard Outlook folder, such as Inbox or Calendar, with the specified name.

public FolderInfo CreatePredefinedFolder(string name, StandardIpmFolder defaultFolder)
ParameterTypeDescription
nameStringThe name of the folder.
defaultFolderStandardIpmFolderWhich standard folder to create.

Return Value

The new folder.

Exceptions

exceptioncondition
InvalidOperationExceptionThe PST is open for reading only.
NotImplementedExceptionThe PST is in the ANSI format, which cannot be edited.
InvalidOperationExceptionThis standard folder already exists in the PST.
NotImplementedExceptionThe file is an OST.

See Also