Changes the folder from which the messages will be received.
&DataType.ChangeFolder( [ FolderName ] )
Type Returned:
Numeric
Where:
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.
Extended Data Types: MAPISession, OutlookSession
Generators:
.NET,
Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)
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 you have the following structure:
Mailbox
Drafts
Inbox
Urgent
Outbox
Pending
On Hold
Sent Items
Public Folders
Favorites
All Public Folders
General
The following FolderName values are valid:
- “Pending”
- “Pending\On Hold”
- “\Mailbox\Pending”
- “\Public Folders\All Public Folders\General”
- “*Inbox\Urgent”
If the folder currently chosen is Inbox\Urgent:
- “..” (Selects Inbox)
- “..\..\Pending\On Hold”
If the folder currently chosen is Inbox:
Note: This method returns an error code, so it is possible to call it as a (&Err = &DataType.ChangeFolder(.....)) function.
Receive Method
Send Method
MAPISession Data Type
OutlookSession Data Type