Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / May 2006

Tip: Looking for answers? Try searching our database.

Address book, strange behavior

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shanej2015@yahoo.com - 20 May 2006 21:44 GMT
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
Sue Mosher [MVP-Outlook] - 23 May 2006 20:23 GMT
Probably because creating it in Access doesn't "resolve" the email address. Show a code snippet to illustrate how you're creating the item.

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx
 

>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
[quoted text clipped - 9 lines]
>
> shanej2015 at yahoo dot com
shanej2015 at yahoo dot com - 25 May 2006 03:47 GMT
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
shanej2015 at yahoo dot com - 26 May 2006 21:10 GMT
any ideas?
shanej2015 at yahoo dot com - 26 May 2006 22:56 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.