Link to home
Start Free TrialLog in
Avatar of Myworld
Myworld

asked on

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.
Avatar of RickEpnet
RickEpnet
Flag of United States of America image

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.
Avatar of Myworld
Myworld

ASKER

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.
I do not know VB so I would not be able to answer that one sorry.
Avatar of Myworld

ASKER

Guys is there any one who can help me
Click request attention
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
ASKER CERTIFIED SOLUTION
Avatar of Ted Bouskill
Ted Bouskill
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Myworld

ASKER

decide to use spfile object to get the file created property  system.io.file.creationtime