creation date of document(sharepoint library)

Hi,
 The document library contains a field created which gives you the document creation time. but if you upload the document it gives you the uploaded date as created. Is there away that i can get the document creation date.
My collegue suggested that i write vba code to get the file property .  please can you guys paste an example and help me.
MyworldAsked:
Who is Participating?
 
Ted BouskillSenior Software DeveloperCommented:
Sorry but the create date in Sharepoint is when the item was 'Created' in Sharepoint, not created on your hard drive.  The only way to change this is a lot of custom code.  If the create date remains in the meta data then you can access it using code on the client.
0
 
RickEpnetCommented:
I would put a form field for the document lib and then put in a date field. Set the current date as the default but his way when you upload files you can put in whatever date you want.
0
 
MyworldAuthor Commented:
Thank you for the reply.
  I need the document library to automaticaly get the creation date of the document. Is it possible by writing VBA code to get the creation property of the file.
If i write VBA code to get the property how do i create a feature to staple it to the document library.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
RickEpnetCommented:
I do not know VB so I would not be able to answer that one sorry.
0
 
MyworldAuthor Commented:
Guys is there any one who can help me
0
 
RickEpnetCommented:
Click request attention
0
 
VBClassicGuyCommented:
Sub GetDateCreated()

    Dim oFS As Object
    Dim strFilename As String

    'Put your filename here
    strFilename = "c:\excel stuff\commandbar info.xls"


    'This creates an instance of the MS Scripting Runtime FileSystemObject class
    Set oFS = CreateObject("Scripting.FileSystemObject")

    MsgBox strFilename & " was created on " & oFS.GetFile(strFilename).DateCreated



    Set oFS = Nothing

End Sub
0
 
MyworldAuthor Commented:
decide to use spfile object to get the file created property  system.io.file.creationtime
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.