I would like to fetch image captured information ( Date & Time) after uploading image as attachment in access form. need assistance .
Got this to work.
Sub GetDatePictureTaken(strFolder, strFileName) Dim strDate As String Dim objShell, objFolder Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.NameSpace(strFolder) strDate = objFolder.GetDetailsOf(objFolder.ParseName(strFileName), 12) strDate = CleanNonDisplayableCharacters(strDate) Debug.Print strDate End Sub Function CleanNonDisplayableCharacters(strInput) Dim strTemp As String, strChar As String, i As Integer strTemp = "" For i = 1 To Len(strInput) strChar = Mid(strInput, i, 1) If Asc(strChar) < 126 And Not Asc(strChar) = 63 Then strTemp = strTemp & strChar End If Next CleanNonDisplayableCharacters = strTemp End Function
Resources: Trying to use Shell object and FileSystemObject in VBScript for file manipulation https://social.technet.microsoft.com/Forums/scriptcenter/en-US/3f220113-8b7c-4d32-9681-cdcc942e1f17/vbscript-systemphotodatetaken-problem
1.4m articles
1.4m replys
5 comments
57.0k users