Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default File Properties

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default File Properties

Kaval,
DSO works on OLE files:
http://www.microsoft.com/downloads/d...DisplayLang=en

Or EXIF data:
http://groups.google.co.uk/group/mic...d8bdd1d48f41aa

And depending which OS you are on (it seems) check the thread in this NG:
Shell Object Not Working Right In XL2000, But No Errors

NickHK

"Kaval" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default File Properties

I've downloaded & installed the file and I can see the references I need in
the object browser.
Now I just need the VBA code to use it.

For example, if I want to read the SummaryProperties.Comments for the file
"C:\Photo1.jpg"





"NickHK" wrote:

Kaval,
DSO works on OLE files:
http://www.microsoft.com/downloads/d...DisplayLang=en

Or EXIF data:
http://groups.google.co.uk/group/mic...d8bdd1d48f41aa

And depending which OS you are on (it seems) check the thread in this NG:
Shell Object Not Working Right In XL2000, But No Errors

NickHK

"Kaval" wrote in message
...
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default File Properties

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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default File Properties

Have a look he
http://www.cpearson.com/excel/docprop.htm

RBS

"Kaval" wrote in message
...
I've downloaded & installed the file and I can see the references I need
in
the object browser.
Now I just need the VBA code to use it.

For example, if I want to read the SummaryProperties.Comments for the file
"C:\Photo1.jpg"





"NickHK" wrote:

Kaval,
DSO works on OLE files:
http://www.microsoft.com/downloads/d...DisplayLang=en

Or EXIF data:
http://groups.google.co.uk/group/mic...d8bdd1d48f41aa

And depending which OS you are on (it seems) check the thread in this NG:
Shell Object Not Working Right In XL2000, But No Errors

NickHK

"Kaval" wrote in message
...
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







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default File Properties

Thanks Michael, that works!

If I may, 2 further 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 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
File Properties TerryTutor Excel Discussion (Misc queries) 2 August 30th 07 06:06 PM
File Properties ALEX Excel Discussion (Misc queries) 1 February 8th 07 02:47 PM
File Properties Andrew Excel Discussion (Misc queries) 2 August 19th 05 01:23 PM
Properties transferring from excel cells to word file properties lubo Excel Programming 4 July 12th 05 11:24 AM
Get File Properties Jos Vens Excel Programming 2 February 10th 04 12:03 AM


All times are GMT +1. The time now is 10:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"