Microsoft Office Tutorials and References
In Depth Information
Importing Your Contacts from Outlook
Importing Your Contacts from Outlook
Use this procedure to import a list of all Microsoft Outlook contacts that meet
specified criteria.
Example file:
Scenario: Extracting information from the contacts in
Outlook is useful, even if it is just to have a backup of the
information. It is also possible to extract contacts that meet
certain criteria.
Figure 35 – Extracted Access Contacts
View the Appendix to learn how to store this procedure
in a Standard module.
Option Explicit¶
' * * * * *¶
Sub ImportContacts()¶
'Variable declaration¶
'Outlook application¶
Dim oApp As Object¶
'Outlook namespace¶
Dim oNameSpace As Object¶
'Outlook MAPI folder¶
Dim oFolder As Object¶
'Outlook Contact Item¶
Dim oContact As Object¶
Dim OutlookRunning As Boolean¶
Dim WS As Worksheet¶
'Turn off screen updating¶
Application.ScreenUpdating = False¶
'Create the Outlook references¶
'Continue when error occurs¶
On Error Resume Next¶
Set oApp = GetObject(, "Outlook.Application")¶
On Error GoTo 0¶
Search JabSto ::

Custom Search