+ Reply to Thread
Results 1 to 3 of 3

Sharepoint add in

Hybrid View

  1. #1
    Registered User
    Join Date
    01-15-2010
    Location
    VA, USA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Sharepoint add in

    I downloaded the Microsoft office 2003 Web services toolkit and I'm trying to learn it better so I can automate some things with our SharePoint site. I am just using the example code from the help file that came with the toolkit but I get an error message. "It is an error to mix objects from different version of MSXML." I am new to xml so this might be an easy fix. Here is the code.

    Sub GetListCollection()
        ' Class created by toolkit to connect to the Web service
        Dim ws As New clsws_Lists
        ' The collection is returned as an XML node list
        Dim lc As MSXML2.IXMLDOMNodeList
        'Root node of the returned list
        Dim nod As MSXML2.IXMLDOMNode
        ' Document to hold an XSLT transform
        Dim docXSLT As New MSXML2.DOMDocument60
        ' Output string for the XML transformation
        Dim strOutput As String
        
        ' Retrieve the collection of lists
        Set lc = ws.wsm_GetListCollection
    
        ' Create the XSLT to select the desired information
        docXSLT.LoadXml ("<xsl:stylesheet" & _
         "xmlns:xsl=""http://www.w3.org/1999/XSL/Transform""" & _
         " xmlns:wss=""http://schemas.microsoft.com/sharepoint/soap/""" & _
         " version=""1.0""><xsl:output method=""text"" />" & _
         "<xsl:template match=""wss:List"">," & _
         "<xsl:value-of select=""@Title""/>," & _
         "<xsl:value-of select=""@ID""/></xsl:template></xsl:stylesheet>")
    
        ' Get the root node from the list
        Set nod = lc.Item(0)
        ' Apply the XSLT transform
    
    
    '****next line of code throws the error
        strOutput = (nod.transformNode(docXSLT))
    
        ' Use the Word 2003 object model to turn the results into a table
        With Selection
            .TypeText ("List Name, List ID" & strOutput)
            .HomeKey wdStory, wdExtend
            .ConvertToTable Separator:=wdSeparateByCommas, NumColumns:=2
            .HomeKey wdStory
        End With
    End Sub

  2. #2
    Registered User
    Join Date
    01-15-2010
    Location
    VA, USA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Sharepoint add in

    Anyone even have a suggestion? Thanks

  3. #3
    Registered User
    Join Date
    01-15-2010
    Location
    VA, USA
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Sharepoint add in

    Bump. Noone? At least any recommendations on where to get a solution?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1