Microsoft Office Tutorials and References
In Depth Information
Importing Your Contacts from Outlook
'Restore screen updating¶
Application.ScreenUpdating = True¶
'Destroy the variables and release memory¶
Set oContact = Nothing¶
Set oFolder = Nothing¶
Set oNameSpace = Nothing¶
Set oApp = Nothing¶
End Sub¶
Exl
Tip: The properties that are imported from Outlook can be changed. This code displays a few
others that can be used. Remember to change the array size from “5” to the appropriate
number and add additional column headers in the lines:
With WS.Range("A1").Resize(1, 5)¶
.Value = Array("Full Name", "Last name", "First name", _¶
"Email", "Business phone")¶
Tip: Also remember to uncomment (remove the apostrophe at left) the properties that are to be
added:
'.Offset(, 5).Value = oContact.Birthday¶
'.Offset(, 6).Value = oContact.BusinessAddress¶
'.Offset(, 7).Value = oContact.BusinessAddressCity¶
'.Offset(, 8).Value = oContact.CompanyName¶
'.Offset(, 9).Value = oContact.Email1DisplayName¶
'.Offset(, 10).Value = oContact.Gender¶
'.Offset(, 11).Value = oContact.HomeAddress¶
'.Offset(, 12).Value = oContact.HomeAddressCity¶
'.Offset(, 13).Value = oContact.JobTitle¶
'.Offset(, 14).Value = oContact.MailingAddress¶
'.Offset(, 15).Value = oContact.MailingAddressCity¶
'.Offset(, 16).Value = oContact.NickName¶
Search JabSto ::




Custom Search