• DIR and SharePoint (Excel 2003)

    Author
    Topic
    #447677

    Having an issue with code that I “borrowed” from this site years ago – and am now trying to apply to files within a SharePoint site. In other respects – my limited experience has been that files, etc stored on these SharePoint sites behave similarly to files on any network drive, but I cannot get this file name array extraction routine to work.

    Public Sub ID_ALL_Files()
    
     Upload_DWOR_Folder = Range("Upload_DWOR_Folder").Value
     FolderFileName = Dir(Upload_DWOR_Folder & "*.xls", vbNormal)
     ArrayPlaceHolder = 1
     Files_To_Upload(ArrayPlaceHolder) = FileNameOnly(FolderFileName)
     Range("Upload_DWOR_Files").Cells(1, ArrayPlaceHolder).Value = Files_To_Upload(ArrayPlaceHolder)
        
     Do While FolderFileName  ""
        FolderFileName = Dir()
        ArrayPlaceHolder = ArrayPlaceHolder + 1
        Files_To_Upload(ArrayPlaceHolder) = FileNameOnly(FolderFileName)
        Range("Upload_DWOR_Files").Cells(1, ArrayPlaceHolder).Value = Files_To_Upload(ArrayPlaceHolder)
     Loop
    End Sub

    Where
    Upload_DWOR_Folder = http://sharepoint.mycompany.com/sites/teamsite/DWOR Upload/

    Viewing 0 reply threads
    Author
    Replies
    • #1092526

      Figured it out…the path name needed to be changed to..

      sharepoint.mycompany.comsitesteamsiteDWOR Upload

    Viewing 0 reply threads
    Reply To: DIR and SharePoint (Excel 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: