You might want to take a look at
http://www.veign.com/code-view.php?type=app&codeid=104
http://pagesperso-orange.fr/pierre.g/xnview/enfeaturesgfl.html
Also, I had been working on an image function a while back. It is below and
feel free to take it and modify it to suit your needs.
'---------------------------------------------------------------------------------------
' Procedure : GetFileProperties
' DateTime : 2006-Nov-24 10:50
' Author : CARDA Consultants Inc. - Main
' Purpose :
'---------------------------------------------------------------------------------------
'
Function GetFileProperties(strFilewFullPath)
'On Error GoTo GetFileProperties_Error
Const arrSize = 39
Dim strFile As String
Dim strPath As String
Dim i As Integer
Dim fsize As Integer
Dim idate As Date
Dim idimension As String
Dim arrHeaders(arrSize)
Set objShell = CreateObject("Shell.Application")
strFile = Dir(strFilewFullPath)
strPath = Left(strFilewFullPath, InStrRev(strFilewFullPath, "\") - 1)
Set objFolder = objShell.Namespace(strPath & "\")
For i = 0 To arrSize
arrHeaders(i) = objFolder.GetDetailsOf(objFolder.Items, i)
'Debug.Print objFolder.GetDetailsOf(objFolder.Items, i)
Next i
For Each strFileName In objFolder.Items
If strFileName = strFile Then
For i = 0 To arrSize
Select Case arrHeaders(i)
'Retrieve only the properties that we are interested in
Case "Size"
fsize = Left(objFolder.GetDetailsOf(strFileName, i),
InStr(objFolder.GetDetailsOf(strFileName, i), " "))
Case "Dimensions"
idimension = objFolder.GetDetailsOf(strFileName, i)
Case "Date Picture Taken"
idate = objFolder.GetDetailsOf(strFileName, i)
End Select
Next i
End If
Next strFileName
If IsNull(fsize) Then fsize = 0
If IsNull(idimension) Then idimension = "unavailable"
If IsNull(idate) Then fsize = ""
GetFileProperties = fsize & "," & idimension & "," & idate
GetFileProperties_Error:
If Err.Number <> 0 Then
MsgBox "MS Access has generated the following error" & vbCrLf &
vbCrLf & "Error Number: " & _
Err.Number & vbCrLf & "Error Source: FileInformation /
GetFileProperties" & vbCrLf & _
"Error Description: " & Err.Description, vbCritical, "An Error has
Occured!"
End If
Exit Function
End Function
--
Hope this helps,
Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples:
http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.