Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Jun 2001
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts

    DIR and SharePoint (Excel 2003)

    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.

    <pre>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</pre>



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

  2. #2
    Star Lounger
    Join Date
    Jun 2001
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: DIR and SharePoint (Excel 2003)

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

    sharepoint.mycompany.comsitesteamsiteDWOR Upload

Posting Permissions

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