Folder.MoveTo method (Outlook)

Moves a folder to the specified destination folder.


expression. MoveTo( _DestinationFolder_ )

expression A variable that represents a 'Folder' object.


Name Required/Optional Data type Description
DestinationFolder Required Folder The destination Folder for the Folder that is being moved.


Setting the REG_MULTI_SZ value, DisableCrossAccountCopy, in HKCU\Software\Microsoft\Office\14.0\Outlook in the Windows registry has the side effect of disabling this method.


This Visual Basic for Applications (VBA) example uses the MoveTo method to move the "My Test Contacts" folder in the default Contacts folder to the Inbox folder.

Sub MoveFolder() 
 Dim myNameSpace As Outlook.NameSpace 
 Dim myFolder As Outlook.Folder 
 Dim myNewFolder As Outlook.Folder 
 Set myNameSpace = Application.GetNamespace("MAPI") 
 Set myFolder = myNameSpace.GetDefaultFolder(olFolderContacts) 
 Set myNewFolder = myFolder.Folders.Add("My Test Contacts") 
 myNewFolder.MoveTo myNameSpace.GetDefaultFolder _ 
End Sub

See also

Folder Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.