/ Forums / Advansys Formativ / Creating Solutions with Formativ / Move an Item to a diffent folder using the MessageID / Reply To: Move an Item to a diffent folder using the MessageID

#7555
Support 3
Participant

See the Object API Message.Move() method to move a message to a destination folder. You can only move the message from the owner Folder.Messages collection. If you don’t have access to the folder object of the message then you need to get the message object using the Account.GetMessage(messageid) method and use the EnclosingFolders properties to get the owner folder.

The sample code below move the selected message from the Mailbox folder to Cabinet.

set oMsg = client.clientstate.commandmessage
call groupwise.account.mailbox.messages.move(oMsg.messageid, groupwise.account.cabinet.messages)
set oMsg = nothing

Hope this helps.

Regards,
Advansys Support