Address book, strange behavior

  • Thread starter Thread starter shanej2015
  • Start date Start date
S

shanej2015

I created a VB module in Access which placed items in a Contact folder
in Outlook. It seems to work fine, as all the entries show up as
expected when viewed in Outlook for when viewing a linked table in
Access. However, if I open the "Address Book" and point it to the
folder the items do not show up. An idividual item only shows in the
Address Book if I edit it within Outlook, not if it is placed there by
Access.

Does anyone know why this is happening and how to fix it?

Shane

shanej2015 at yahoo dot com
 
Probably because creating it in Access doesn't "resolve" the email address. Show a code snippet to illustrate how you're creating the item.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Sub FAXList(e1, e2, e3, e4)

Dim loOutlook As Outlook.Application
Dim loNS As Outlook.NameSpace
Dim loContactitem As Outlook.ContactItem
Dim loSafeItem As Object
Dim objFolder As Outlook.MAPIFolder
Dim MyNewFolder As Outlook.MAPIFolder

Set loOutlook = CreateObject("Outlook.Application")
Set loNS = loOutlook.GetNamespace("MAPI")
loNS.Logon
Set objFolder =
loNS.GetDefaultFolder(olFolderContacts).Folders("media")
Set loContactitem = objFolder.Items.Add
'Set loContactitem = loOutlook.CreateItem(olContactItem) ''
This creates the ContactItem Object
Set loSafeItem = CreateObject("Redemption.SafeContactItem")

With loSafeItem
.Item = loContactitem ' This attaches the Object to
' Redemption SafeContactItem Object
.BusinessFaxNumber = e3
.FirstName = e1
.LastName = e2
.CompanyName = e4
.Recipients.ResolveAll
.Save
End With

Set loOutlook = Nothing
Set loNS = Nothing
Set loContactitem = Nothing
Set loSafeItem = Nothing

End Sub
 
Well I got it to work, FINALLY. All I did was switch the order of the
fields from above to

.FirstName = e1
.LastName = e2
.BusinessFaxNumber = e3
.CompanyName = e4
.Recipients.ResolveAll
.Save

in other words don't add the email, or phone/fax numbers first. do the
names first.

Shane
 
Back
Top