Perhaps you have multiple vcard files stored in a Windows folder. If they are not in your Outlook Contacts folder and you wish to batch send an email to them, you can use the method introduced in this article.
Some users would like to batch send an Outlook email to all the contacts which exist as vCards in a Windows folder, not stored in Outlook. In normal situation, you have to firstly import the vCards into Outlook. Then create an email and add the imported contacts as recipients. However, it’s a bit troublesome. Therefore, in the followings, we will share a much smarter way with you.
Batch Send an Email to All Contacts Stored in a Windows Folder
- First off, launch your Outlook application.
- Then, in the main Outlook window, press “Alt + F11” key buttons.
- Next, in the following “Microsoft Visual Basic for Applications” window, open a module that is not in use.
- Subsequently, copy and paste the following VBA code into this module.
Sub BatchSendanEmailToAllvCardsInaWindowsFolder() Dim objWindowsFolder As Object Dim strWindowsFolder As String Dim objMail As Outlook.MailItem Dim objFileSystem As Object Dim objFile As Object Dim objVCard As Object Dim strVCard As String Dim objInspectors As Outlook.Inspectors Dim objWsShell As Object 'Select a Windows folder Set objShell = CreateObject("Shell.Application") Set objWindowsFolder = objShell.BrowseForFolder(0, "Select a Windows Folder:", 0, "") If Not objWindowsFolder Is Nothing Then 'Create a new email Set objMail = Outlook.Application.CreateItem(olMailItem) strWindowsFolder = objWindowsFolder.self.Path & "\" Set objFileSystem = CreateObject("Scripting.FileSystemObject") Set objWindowsFolder = objFileSystem.GetFolder(strWindowsFolder) For Each objFile In objWindowsFolder.Files If objFileSystem.GetExtensionName(objFile) = "vcf" Then 'Get the vCards in this Windows folder Set objVCard = objFile strVCard = objVCard.Path 'Open these vCards Set objInspectors = Outlook.Application.Inspectors If objInspectors.count = 0 Then Set objWsShell = CreateObject("WScript.Shell") objWsShell.Run (Chr(34) & strVCard & Chr(34)) Do Until objInspectors.count = 1 DoEvents Loop 'Add the email address of vCards to the email's recipient list objMail.Recipients.Add (objInspectors.Item(1).CurrentItem.Email1Address) objInspectors.Item(1).Close olDiscard End If End If Next 'Display this email objMail.Recipients.ResolveAll objMail.Display End If End Sub
- After that, you can take the following steps to try this macro.
- For a start, in the current macro window, press F5 key button.
- Then, you will be required to select a Windows folder which contains all the source vCards, like the screenshot below:
- After selecting a Windows folder, hit “OK” button.
- Subsequently, the macro will detect the vCards in this folder and extract their email addresses.
- Ultimately, a new email will display. Its “To” field will be filled with these email addresses, shown as the following image:
Shield Outlook from Damage
Since Outlook is prone to corruption, you should take adequate precautions to prevent Outlook from unwanted damage. Under this cirumstance, it is suggested to keep a powerful PST fix tool nearby, such as DataNumen Outlook Repair. It can get back maximum data for you even in case of unanticipated and series Outlook crashes.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including repair mdf and outlook repair software products. For more information visit www.datanumen.com