Macro in Office 365 Excel

Nguyen, Tee 106 Reputation points
2021-06-21T15:55:24.1+00:00

We are trying to troubleshoot an issue for one of our clients in which we developed an excel macro to populate a copy of an excel workbook onto their sharepoint website. Their macro stopped functioning and keep getting an Access denied error below:

Const spBASE_URL = https://mycompany365.sharepoint.com/sites/Test/ 'Your sharepoint site
Const spDOC_LIB = "Documents" 'Your sharepoint library name plus your folder name (if required)

Const spCONTENT_TYPE = "0x000000000000000000000000000000000000000"

Here is snippet of some of the pertinent macro. we was wondering if you know why we would be getting the access denied error and if there is workaround?
...
'Perform the upload
Dim ObjectStream, ObjectDOM, ObjectElement, ObjectHTTP As Object
Dim BinaryFile, EncodedFile, strurlservice, strsoapaction As String
Dim strsoapcommand

Set ObjectStream = CreateObject("ADODB.Stream")
Set ObjectDOM = CreateObject("Microsoft.XMLDOM")
Set ObjectElement = ObjectDOM.createElement("TMP")
Set ObjectHTTP = CreateObject("Microsoft.XMLHTTP")
...
ObjectHTTP.Open "Get", strurlservice, False
ObjectHTTP.SetRequestHeader "Content-Type", "text/xml; charset=utf-8"
ObjectHTTP.SetRequestHeader "SOAPAction", strsoapaction
ObjectHTTP.Send strsoapcommand

We are wondering if Macro is support or not support for Online Excel Macro and office document from MS to indicate support/not support Macro.

Thanks
Tee

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,596 questions
{count} votes