Else
MsgBox “Error No: “ & Err.Number _
& “; Description: “ & Err.Description
Resume ErrorHandlerExit
End If
End Function
FIGURE 8.28
A table of contact data imported from an Outlook folder.
When working with contacts, the ideal situation would be to maintain your most com-
plete information in a set of linked Access tables, and synchronize them with Outlook
contacts that would display most of the information in an easy-to-use interface. Chapter 11 covers
synchronizing linked Access contact tables with a folder of Outlook contacts.
Summary ..........................................................................................................................
This chapter has described the components of the Outlook object model you need to understand
in order to work with Outlook objects and has given you examples of exporting Access data to
Outlook and importing Outlook data into Access (or linking to it), as well as creating new Outlook
items based on data changes in Access tables. While there are both advantages and disadvantages
to storing contacts in Access and Outlook, I recommend exporting tasks and appointments from
Access tables to Outlook, so they can be managed in its superior interface. For contacts, the deci-
sion depends on which is more important to you: the convenience and attractive interface of
Outlook contacts, or the more sophisticated Access relational database interface, allowing you to
set up one-to-many links between companies and contacts, or contacts and phones or IDs.
CROCROSSSS-REF-REF
Part II Writing VBA Code to Exchange Data between Office Components