MoveTo Method

Applies To

MAPIFolder object.

Description

Moves the current folder to the specified destination folder.

Syntax

expression.MoveTo(DestFldr)

expression An expression that returns a MAPIFolder object.

DestFldr Required MAPIFolder. The folder to add the moved folder to.

Example

This example adds a new folder to the default Contacts folder, and then moves it to the default Inbox folder.

Set myFolder = olNameSpace.GetDefaultFolder(olFolderContacts)
Set myNewFolder = myFolder.Folders.Add("My Contacts")
myNewFolder.MoveTo olNameSpace.GetDefaultFolder(olFolderInbox)