(Contents)(Previous)(Next)

MoveToFolder(sFolder As String)

Description: Moves the message to a folder which is identified by the passed in folder name.

Syntax: object.MoveToFolder(sFolder)

Parameters: object - Required, the Message object

sFolder - The name of the folder to which the message will be moved.

Remarks: This method moves the message from its current folder to the folder identified by the passed in folder name.

Returns: Returns True if the message was successfully moved, otherwise, if the message was not successfully moved or the folder was not found then False is returned.

Example:

Dim session As Object

Set session = CreateObject("OfficeTalk.Session")

Call session.Logon(login name, password)

Set message = session.NewMessage

if (message.MoveToFolder( "Old")) Then

MsgBox "Successfully moved message"

End If


Next