Platform SDK: CDO for Windows 2000

Setting Language and Time Zone Information

Language code and time zone information is stored in the Configuration object associated with the Message object. These values are stored in the http://schemas.microsoft.com/cdo/configuration/languagecode and urn:schemas:calendar:timezoneid fields.

The language code is used when constructing the response text for reply and forwarded messages. The time zone identifier is used when converting date and time values to local times.

To configure the language code and time zone used for messaging, set the http://schemas.microsoft.com/cdo/configuration/languagecode and urn:schemas:calendar:timezoneid fields to appropriate values in the associated Configuration object.

[Visual Basic]
' Reference to Microsoft ActiveX Data Objects 2.5 Library
' Reference to Microsoft CDO for Windows 2000 Library
Dim iConf As New CDO.Configuration
Dim Flds  As ADODB.Fields
Set Flds  = iConf.Fields

' Set the configuration for Network Send
Flds(cdoLanguageCode) = "en-us"
Flds(cdoTimezoneId)   =  cdoMountain
' .. set additional fields
Flds.Update

Dim iMsg As New CDO.Message
Set iMsg.Configuration = iConf

Both of these fields have default values that depend on the current locale and system settings of the computer. In many cases, you will not need to set these values explicitly.