Hi all,
I've latley been trying to develop a code to remove files from a sharepoint. After some time I developed a code (see below) that works even better than expected, the only problem is that to delete the files I have to previously open them and for big files this can consume quite a lot of time. Anyone know of a way to do so without opening the files to be deleted?
Code:
I've latley been trying to develop a code to remove files from a sharepoint. After some time I developed a code (see below) that works even better than expected, the only problem is that to delete the files I have to previously open them and for big files this can consume quite a lot of time. Anyone know of a way to do so without opening the files to be deleted?
Code:
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Workbooks.Open Filename:="FullPath", ReadOnly:=True, UpdateLinks:=xlUpdateLinksNever
Activeworkbook.SharedWorkspace.RemoveDocument
ActiveWorkbook.Close
Applications.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub