Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
JPEG File Properties continued
Thanks to Michael! The suggested code worked to read the file properties from
JPEGs, however I had a couple of extra questions: 1) That code is not returning the Keywords field from the file properties. Is it possible to get that as well? 2) How can I adapt to write to (as well as read from) the file properties from excel? Many thanks, Kaval "Michel Pierron" wrote: Hi Kaval, You can try: Private Sub FileInfo(iPath$, iFile$) Dim i As Byte, u As Byte, Item$, Info With CreateObject("Shell.Application").NameSpace(CStr(i Path)) For i = 0 To 34 Info = .GetDetailsOf(.ParseName(iFile), i) Item = .GetDetailsOf(.Items, i) If Len(Info) And Len(Item) Then u = u + 1 Cells(u, 1) = .GetDetailsOf(.Items, i) Cells(u, 2) = Info End If Next i End With End Sub Sub Test() Const P$ = "Path of My file name" Const F$ = "My file name" Call FileInfo(P, F) End Sub Regards, MP "Kaval" a écrit dans le message de news: ... I notice that it is possible in windows explorer to attached comments and other fields to JPEG files. Is it possible to read those comments using excel VBA? What about writing them? I am considering using some of the property fields (eg comments, keywords, titles, authors etc) to store info on our photos but I would like to be able to extract into excel and ideally update the fields from excel. Any help welcome, Kaval |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
JPEG File Properties continued
I posted one way to read EXIF data here if that's what you mean by keywords.
It needs Veign's class module. http://tinyurl.com/ojdbz Regards, Peter T "Kaval" wrote in message ... Thanks to Michael! The suggested code worked to read the file properties from JPEGs, however I had a couple of extra questions: 1) That code is not returning the Keywords field from the file properties. Is it possible to get that as well? 2) How can I adapt to write to (as well as read from) the file properties from excel? Many thanks, Kaval "Michel Pierron" wrote: Hi Kaval, You can try: Private Sub FileInfo(iPath$, iFile$) Dim i As Byte, u As Byte, Item$, Info With CreateObject("Shell.Application").NameSpace(CStr(i Path)) For i = 0 To 34 Info = .GetDetailsOf(.ParseName(iFile), i) Item = .GetDetailsOf(.Items, i) If Len(Info) And Len(Item) Then u = u + 1 Cells(u, 1) = .GetDetailsOf(.Items, i) Cells(u, 2) = Info End If Next i End With End Sub Sub Test() Const P$ = "Path of My file name" Const F$ = "My file name" Call FileInfo(P, F) End Sub Regards, MP "Kaval" a écrit dans le message de news: ... I notice that it is possible in windows explorer to attached comments and other fields to JPEG files. Is it possible to read those comments using excel VBA? What about writing them? I am considering using some of the property fields (eg comments, keywords, titles, authors etc) to store info on our photos but I would like to be able to extract into excel and ideally update the fields from excel. Any help welcome, Kaval |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I save a worksheet as a jpeg file? | Excel Programming | |||
RowSource in Properties Dialog continued...... | Excel Programming | |||
Properties transferring from excel cells to word file properties | Excel Programming | |||
Conditional display of a .jpeg file? | Excel Discussion (Misc queries) | |||
how can I insert jpeg file in the cell? | Excel Programming |