SetLocaleIDs Method (CDONTS NewMail Object)

The SetLocaleIDs method sets identifiers that define a messaging user's locale.

Syntax

objNewMail.SetLocaleIDs(CodePageID) 
 
objNewMail
Required. This NewMail object.
CodePageID
Required. Long. The code page identifier to be used for this messaging user.

Remarks

A locale is the set of features of a messaging user's environment that are dependent on language, country, culture, and conventions. These features include the character selection, the collating sequence and sort order, and the date, time, and currency formats. The SetLocaleIDs method sets identifiers that determine the behavior of locale-sensitive operations.

A code page identifier is a long integer specifying the ordered character set to use when displaying text. Information about a code page can be obtained from the Windows NT GetCPInfo function.

When you first create a NewMail object it uses the locale values in the user's registry. However, you can change a NewMail object's locale after its creation by calling the its SetLocaleIDs method. Such a call does not affect the locale of any other Message or NewMail object, nor does it alter the settings established by a Session object's SetLocaleIDs method.

SetLocaleIDs tests the validity of the code page specified by the CodePageID parameter before actually setting the locale identifiers. If the code page is not valid, CdoE_INVALID_PARAMETER is returned.