Upload file to SharePoint from machine with CAC

R

Richard

I'm looking for macro functions to upload and download files to SharePoint
file sharing site - and I'm running a gov computer with a CAC card, so I
don't use user login and passwords to access the SharePoint site

I found this code, but is doesn't work:
Function WebUploadFile(file, url, user, pass)
Dim objXMLHTTP
Dim objADOStream
Dim arrbuffer
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1
objADOStream.LoadFromFile file
arrbuffer = objADOStream.Read()
Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
objXMLHTTP.Open "PUT", url, False, user, pass
objXMLHTTP.send arrbuffer
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top