Quantcast
Channel: Toad Data Point Forum - Recent Threads
Viewing all articles
Browse latest Browse all 2544

RE: Copy file activity and sharepoint 365

$
0
0

My organization isn't currently using SharePoint 365, but I've been able to successfully upload files to SharePoint by using a file Save As macro that uploads to SharePoint.  If you can manually save a Excel workbook to your SharePoint location, then this method has a good chance of working for you.  I recommend using the Export widget to trigger a macro that does the SharePoint upload for you at the end of your automation.  Here is sample of the macro that you'll need to get you started. 

Dim PreviousMonth As String
Dim Currentdate As String
Dim ServerLocation As String
Dim Extension As String
Dim POLine  As String

Currentdate = Now
PreviousMonth = Month(DateAdd("m", -1, Currentdate))
PreviousMonthYear = Year(DateAdd("m", -1, Currentdate))
ServerLocation = "sssteams.providence.org/.../OSCM IS Reports/"
Extension = ".xlsm"
POLine = "PO_Line_Data"

Application.DisplayAlerts = False

    ActiveWorkbook.SaveAs Filename:= _
        ServerLocation & POLine & PreviousMonth & PreviousMonthYear & Extension, _
        FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False

I hope this helps


Viewing all articles
Browse latest Browse all 2544

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>