=loMSG.Move(loNameSpace.Folders(1).Folders(14))Folders(1) refers to the PST file, Exchange account, etc. The number depends on what mailboxes a user opens any how many PST file they made available. The second folder refers to the folder inside the mailbox. It's easy if you refer to the folder by name, such as:
=loMSG.Move(loNameSpace.Folders("Personal Folders").Folders("Done"))However, the name of the first level depends on the name of the mail box. Personal Folder is the name for the English version with a PST file. Localized versions and exchange server connections have a different name. Therefore it might be even easier, to let the user pick the desired folder once:
Local loOutlook, loNamespace, loFolder loOutlook = CreateObject("outlook.application") loNamespace = loOutlook.GetNamespace("MAPI") loFolder = loNamespace.PickFolder()You can then use the folder's EntryId to locate the folder everywhere.