Öncelikle resim olup olmadığını kontrol ettirip, resim var ise resim kodunu vcard içine yazdırmak lazım.
cmd_tumkayitlar isimli butonun tıklandığında olayındaki
1-)
File = CurrentProject.path & "\resimler\" & rst!fotograf
kodunun hemen altına
If FileExists(File) = True Then
kodu ekleyin,2-)
ts.WriteLine "PHOTO;TYPE=JPEG;ENCODING=B:" & encode
kodunun altına da
End If
kodu ekleyin.3-)
Option Compare Database
Function FileExists(ByVal strFile As String, Optional bFindFolders As Boolean) As Boolean
Dim lngAttributes As Long
lngAttributes = (vbReadOnly Or vbHidden Or vbSystem)
If bFindFolders Then
lngAttributes = (lngAttributes Or vbDirectory) '
Else
Do While Right$(strFile, 1) = "\"
strFile = Left$(strFile, Len(strFile) - 1)
Loop
End If
On Error Resume Next
FileExists = (Len(Dir(strFile, lngAttributes)) > 0)
End Function
Function FolderExists(strPath As String) As Boolean
On Error Resume Next
FolderExists = ((GetAttr(strPath) And vbDirectory) = vbDirectory)
End Function
Function TrailingSlash(varIn As Variant) As String
If Len(varIn) > 0 Then
If Right(varIn, 1) = "\" Then
TrailingSlash = varIn
Else
TrailingSlash = varIn & "\"
End If
End If
End Function
Kodunuda modüle kaydedin.