将联系人添加到链接的交换表

时间:2013-12-20 19:25:46

标签: exchange-server ms-access-2010 linked-tables

我正在尝试构建一个访问过程,以将联系人添加到outlook文件夹。我已链接该文件夹,可以添加,更新和删除记录。但并非所有领域都在Outlook中正确显示。即地址字段。

我添加了一个测试联系人并添加了一个地址,重新访问并完美地模仿了数据,但Outlook中没有地址显示。

为了让地址显示在Outlook中,是否需要做些什么?

这是我的数据:

First   Last    Title   Company Department  Office  Post Office Box Address City    State   Zip/Postal Code Country/Region  Phone
John    Test        superduper              500 west T  Test City   MI  99999   United States of America    1 800 555 5555
Bill    Test        Awesomedawesome             600 East G  Test City   MI  99999   United States of America    1 800 666 6666

第一条记录是添加了outlook,较低的一条是添加了访问权限。

以下是我在Outlook中的观点: enter image description here

1 个答案:

答案 0 :(得分:0)

我最终走了代码路线:

Dim olCI As Outlook.ContactItem
Set olCI = mf.Items.Add(olContactItem)
    With olCI
        .FullName = Trim(rs!Name)
        .Title = Trim(rs!Salutation)
        .JobTitle = Trim(rs!Title)
        .Email1Address = Trim(rs!Email)
        .CompanyName = Trim(rs!AccountName)
        .BusinessAddressStreet = Trim(rs!MailingStreet)
        .BusinessAddressCity = Trim(rs!MailingCity)
        .BusinessAddressPostalCode = Trim(rs!MailingZipCode)
        .BusinessAddressCountry = Trim(rs!MailingCountry)
        .BusinessFaxNumber = Trim(rs!Fax)
        .BusinessTelephoneNumber = Trim(rs!Phone)
        .OtherTelephoneNumber = Trim(rs!OtherPhone)
        .BusinessHomePage = ""
        .MobileTelephoneNumber = Trim(rs!MobilePhone)
        .Birthday = IIf(IsNull(rs!Birthdate), 0, rs!Birthdate)
        .Department = rs!Department
        .Save
    End With