Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kiran
 
Posts: n/a
Default Getting NTFS file attributes

Is it possible to get NTFS file attributes (like Date created, author, size)
to get it using VBA code. If yes, Can you please let me know how I can achive
that

Thnx

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Kiran,

This isn't getting the NTFS attributes directly, but looking at custom
properties stored with the workbook

First, add this UDF (user defined function) to a standard code module

'-----------------------------------------------------------------
Function DocProps(prop As String)
'-----------------------------------------------------------------
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function


and enter in a cell such as
=DocProps ("last author")
or
=DocProps ("last save time")

other attributes

Title
Subject
Author
Keywords
Comments
Template
Last Author
Revision Number
Application Name
Last Print Date Creation Date
Last Save Time
Total Editing Time
Number of Pages
Number of Words
Number of Characters
Security
Category
Format
Manager Company
Number of Bytes
Number of Lines
Number of Paragraphs
Number of Slides
Number of Notes
Number of Hidden Slides
Number of Multimedia Clips
Hyperlink Base
Number of Characters (with spaces)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Kiran" wrote in message
...
Is it possible to get NTFS file attributes (like Date created, author,

size)
to get it using VBA code. If yes, Can you please let me know how I can

achive
that

Thnx



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
Opening a file with code without a set file name jenkinspat Excel Discussion (Misc queries) 1 March 4th 05 10:50 AM
Locating a file in excel with a partial file name. Audra Excel Discussion (Misc queries) 2 February 19th 05 08:52 PM
Locating a file in excel with a partial file name. Audra Excel Discussion (Misc queries) 1 February 19th 05 08:51 PM
File Attributes dsti3 Excel Discussion (Misc queries) 1 February 10th 05 05:51 AM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM


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

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

About Us

"It's about Microsoft Excel"