2013-12-20 84 views
2

我正在嘗試構建將聯繫人添加到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 

第一個記錄添加前景,下一個是接入添加。

下面是這個視圖我得到了展望: enter image description here

+0

您是否嘗試從Outlook拉'約翰Test'和比較對象?我在做SharePoint時發現,某些字段名稱不是您可能認爲的那樣。它們可能被描述爲「Address」,但在Exchange中,它可能是「user_address_1」作爲「Address」作爲其名稱的密鑰,值爲「500 west T」。 – GoldBishop

回答

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 
相關問題