CopyTo Method

Applies To

MAPIFolder object.

Description

Copies the current folder in its entirety to the destination folder. Returns a MAPIFolder object that represents the new copy.

Syntax

expression.CopyTo(DestFldr)

expression An expression that returns a MAPIFolder object.

DestFldr Required MAPIFolder object. The folder to add the copied folder to.

Example

This example copies the current folder (in this case, the default Contacts folder) to the default Inbox folder.

Set myInboxFolder = olNameSpace.GetDefaultFolder(olFolderInbox)
Set myCurrentFolder = olNameSpace.GetDefaultFolder(olFolderContacts)
Set myNewFolder = myCurrentFolder.CopyTo(myInboxFolder)