问题
I would like to seek help regarding on getting the last modified date of a file in a Sharepoint. What VBA code/command will I use in order to execute it. I would like to show this "Last Modified Date" of the file in a MsgBox when a command button is clicked.
Your prompt response is very much appreciated.
回答1:
This one had me scratching my head for a bit too...
Make sure to add "@ssl" following the root URL e.g
FileDateTime("\\site.com@ssl\file.xlsx")
回答2:
You can use
FileDateTime ( file_path )
to get the date and time of when a file was created or last modified.
For more information please visit the below link..
VBA Help
回答3:
I've been trying to figure this out for a while and I stumbled upon something in another line of inquiry that led me to a solution.
In your VBA window, go to Tools -> References, and then scroll down and check the box next to "Microsoft Scripting Runtime".
Then when you specify your link it's going to read like this:
FileDateTime("//site.com/page/file.xlsx
").
No "http:" Once I did that, it worked like a charm.
来源:https://stackoverflow.com/questions/28020560/how-will-i-get-the-last-modified-date-of-a-file-in-a-sharepoint-using-vba