Sub Opensavevcard ()
rem Batch file Rename (remove "_" and spaces in filename)
Dim objWSHShell as Iwshruntimelibrary.iwshshell
Dim objOL as Outlook.Application
Dim COLINSP as Outlook.inspectors
Dim Strvcname as String
Dim FSO as Scripting.FileSystemObject
Dim Fsdir as Scripting.folder
Dim Fsfile as Scripting.file
Dim Vcounter as Integer
Set FSO = New Scripting.FileSystemObject
Set Fsdir = fso. GetFolder ("C:\vcards")
For each fsfile in Fsdir.files
Strvcname = "C:\vcards\" & Fsfile.name
StrName = Replace (Strvcname, "_", "")
StrName = Replace (StrName, "", "")
Name Strvcname as StrName
Next
End Sub
Sub OpenSaveVCard1 ()
REM Bulk Import
Dim objWSHShell as Iwshruntimelibrary.iwshshell
Dim objOL as Outlook.Application
Dim COLINSP as Outlook.inspectors
Dim Strvcname as String
Dim FSO as Scripting.FileSystemObject
Dim Fsdir as Scripting.folder
Dim Fsfile as Scripting.file
Dim Vcounter as Integer
Set FSO = New Scripting.FileSystemObject
Set Fsdir = fso. GetFolder ("C:\vcards")
For each fsfile in Fsdir.files
Strvcname = "C:\vcards\" & Fsfile.name
Set objOL = CreateObject ("Outlook.Application")
Set COLINSP = objol.inspectors
If colinsp.count = 0 Then
Set objWSHShell = CreateObject ("Wscript.Shell")
Objwshshell.run (Strvcname)
Set COLINSP = objol.inspectors
If ERR = 0 Then
Do Until Colinsp.count = 1
DoEvents
Loop
Colinsp.item (1). Currentitem.save
Colinsp.item (1). Close Oldiscard
Set COLINSP = Nothing
Set objOL = Nothing
Set objWSHShell = Nothing
End If
End If
Next
End Sub