Quantcast
Viewing all articles
Browse latest Browse all 26374

Publishing an Excel Workbook in Sharepoint Site using Excel VBA

i have an excel workbook and i need to publish that work book in a sharepoint site using Excel VBA. So Ihave Created a method in a module using below code

Private sc_Lists As SoapClient30
Public c_WSDL_URL As String
Private Const c_SERVICE As String = "Lists"
Private Const c_PORT As String = "ListsSoap"
Private Const c_SERVICE_NAMESPACE As String = "http://schemas.microsoft.com/sharepoint/soap/"


Private Sub Class_Initialize()

   
Dim str_WSML As String
    str_WSML
= ""
   
Set sc_Lists = New SoapClient30
    c_WSDL_URL
= glb_URL

    sc_Lists
.MSSoapInit2 c_WSDL_URL, str_WSML, c_SERVICE, c_PORT, c_SERVICE_NAMESPACE

    sc_Lists
.ConnectorProperty("WinHTTPAuthScheme") = &H1
    sc_Lists
.ConnectorProperty("UseSSL") = True
    sc_Lists
.ConnectorProperty("AuthUser") = "username"
    sc_Lists
.ConnectorProperty("AuthPassword") = "pass"

End Sub

the Problem is when i openning the excel document and try to publish it then it will asks for credentials of my sharepoint site eventhough i have provided it in the code as above. so what i need is to prevent asking credentials when i try to publish it.

Thanks in advance


Viewing all articles
Browse latest Browse all 26374

Trending Articles