LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default reading and modifying file comments

I can access most of a files attributes and info using FSO commands but
this does not give me acces to the Comments properties.
Can anyone help? Ideally I want to be able to modify the Comments as
well.
My current code is listed below.

Dim FSO As Scripting.FileSystemObject
Dim SourceFolder As Scripting.Folder, SubFolder As Scripting.Folder
Dim FileItem As Scripting.File
Dim r As Long
Set FSO = New Scripting.FileSystemObject
Set SourceFolder = FSO.GetFolder(SourceFolderName)
r = Range("A65536").End(xlUp).Row + 1
For Each FileItem In SourceFolder.Files
Cells(r, 1).Formula = Left(FileItem.Path, Len(FileItem.Path) -
Len(FileItem.Name) - 1)
Cells(r, 2).Formula = FileItem.Name
Cells(r, 5).Formula = FileItem.Size
Cells(r, 6).Formula = FileItem.Type
Cells(r, 7).Formula = FileItem.DateCreated
Cells(r, 8).Formula = FileItem.DateLastAccessed
Cells(r, 9).Formula = FileItem.DateLastModified
Cells(r, 10).Formula = FileItem.Attributes
Cells(r, 11).Formula = FileItem.Comments ' Comments Doesn't
work
Cells(r, 12).Formula = FileItem.ShortPath & FileItem.ShortName
next FileItem

 
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
Modifying format for multiple comments in a workbook rmc Excel Discussion (Misc queries) 1 April 27th 09 04:13 PM
modifying a excel *.csv file problem J_J[_2_] Excel Programming 2 February 4th 06 01:55 PM
reading comments value into a string variable Matilda Excel Programming 2 November 18th 05 11:18 PM
reading from another file and pasting to current file, "combobox" Darius New Users to Excel 1 September 26th 05 07:13 AM
Help with reading comments. Al Bundy Excel Programming 0 April 30th 04 01:05 AM


All times are GMT +1. The time now is 06:30 AM.

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"