InternetCodepage 属性

       

返回或设置项目所用的 Internet 代码页。Long 类型。Internet 代码页定义了该项目使用的文本编码方案。可读写。

expression.InternetCodepage

expression  必选。该表达式返回“应用于”列表中的一个对象。

示例

以下示例搜索用户的“收件箱”,并显示所有 Internet 代码页值为 1256 的邮件项目发件人的姓名。该值相当于阿拉伯文字的 Internet 代码页值。如果没有找到邮件项目,就向用户显示一条消息。

Sub FindArabicUsers()
'Displays information about an Internet code page

    Dim olApp As Outlook.Application
    Dim objMail As MailItem
    Dim objItems As Items
    Dim strUsers As String

    Const cstArabic As String = "1256"

    Set olApp = Outlook.Application
    Set objItems = _
        olApp.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox).Items
    For Each objMail In objItems
        If objMail.InternetCodepage = cstArabic Then
            strUser = strUser & objMail.SenderName & vbCr
        End If
    Next objMail

    If strUsers = "" Then
        MsgBox "There are no Mail items in the Inbox from users with the specified " _
            & "Internet code page."
    Else
        MsgBox "The following users use the specified foreign Internet code page value:" _
                & vbCr & strUser
    End If

End Sub