How will I get the last modified date of a file in a SharePoint using VBA?

好久不见. 提交于 2019-12-25 06:59:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!