Changes the folder from which the messages will be received.
&DataType.ChangeFolder( [ FolderName ] )
Is the name of the folder from which the emails will be read. This is an optional parameter; if it is bypassed or left blank, a reference to the Inbox folder will be made.
Rules for the Correct Definition of the Folder Names
- The notation is similar to the one used in DOS and UNIX to navigate directories, with some exceptions. The rules are usually the following:
- The “.” character can be used to indicate the current folder.
- The “..” string can be used to indicate a higher level folder.
- The “\” character can be used to indicate a sub-folder.
- The “\” character can be used at the beginning of the name to indicate the root.
If a simple name is specified, without “\” or “..”, it will refer to an Inbox sister folder. “*Inbox”, “*Outbox”, “*Sent Items”, “*Deleted Items” and “*Drafts” values will be used to indicate the folders that are usually called such names, even if their names are not exactly those. This is useful when a client is used in another language. For instance, in the Spanish version of Outlook, “*Inbox” will refer to the “Inbox” folder regardless of the name it has in Spanish.
If we have the following structure:
All Public Folders
The following FolderName values are valid:
“\Public Folders\All Public Folders\General”
If the folder currently chosen is Inbox\Urgent:
“..” (Selects Inbox)
If the folder currently chosen is Inbox:
This method returns an error code, so it is possible to call it as a (&Err = &DataType.ChangeFolder(.....)) function.
Extended Data Types: MAPISession, OutlookSession
Languages: .NET, Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)
MAPISession Data Type
OutlookSession Data Type