VBA code to make a backup in the Sharepoint before closing workbook

137 views Asked by At

I would like to have a vba code which automatically makes the backup to a Folder in the SharePoint. I have found a Code which makes a duplicate file within the hard disk but not in SharePoint.

SharePoint link(https://web-mp01/sites/5034/SitePages/Home.aspx), I Need to do backup in this link.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
        Application.DisplayAlerts = False
        ActiveWorkbook.SaveCopyAs Filename:="C:\TEMP\" & _
           TesStr & "-" & TesStr & "-" & ActiveWorkbook.Name
        ActiveWorkbook.Save
        Application.DisplayAlerts = True
End Sub
0

There are 0 answers