Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

No ClientContext Constructor?

$
0
0

I have legacy VB6 and VBA applications which need to use CSOM with the SharePoint SDK.  I have used the following Windows console commands to create the required Type Libraries:

RegAsm Microsoft.SharePoint.Client.dll /tlb

RegAsm Microsoft.SharePoint.Client.Runtime.dll /tlb

RegAsm Microsoft.SharePoint.Client.Search.dll /tlb

I have added references to the Type Libraries and added the following code:

Dim site As String

site = "http://micron.com/sites/mySite"

Dim thisContext As Microsoft_SharePoint_Client.ClientContext

thisContext = New Microsoft_SharePoint_Client.ClientContext(site)

But, VB says it's a syntax error.  Also, when I type the New keyword the list of objects does not include Microsoft_SharePoint_Client.ClientContext.  It appears that Microsoft has not published a Constructor for the ClientContext class that can be consumed by VB6 or VBA.  It does exist for VB Dot Net so my only workaround is to develop a Dot Net 4.0 DLL that provides the required SharePoint functions which can be consumed by VB6 and VBA.

Has anyone been able to create a ClientContext instance with VB6 or VBA?  How?


Viewing all articles
Browse latest Browse all 25064

Trending Articles



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