Your technology certification is waiting. Enroll in Cloud Class ®
Dim myOlApp As Outlook.Application
Dim objContact As ContactItem
Set myOlApp = New Outlook.Application
Set olns = myOlApp.GetNamespace("MAPI")
' Set MyFolder to the default contacts folder.
Set myFolder1 = olns.Folders("Sean O'Reilly")
Set myfolder = myFolder1.Folders("Contacts")
' Get the number of items in the folder.
NumItems = myfolder.Items.Count
' Loop through all of the items in the folder.
For i = 1 To NumItems
If myfolder.Items(i).Class = 40 Then
Set objContact = myfolder.Items(i)
Debug.Print TypeName(objContact) + ":" + objContact.FullName
If Not TypeName(objContact) = "Nothing" Then
If Not objContact.FullName = "" Then
strname = "H:\Personal\Contacts\" & TrimALL(objContact.FullName) & ".vcf"
objContact.SaveAs strname, olVCard
MsgBox "All Contacts Exported!"
' need to trim all non-printable char
Open in new window
Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.