Getting Path to Excel file stored in SharePoint returns Null Value RRS feed

  • Question

  • Using Excel 2013 I have macro enabled file stored in SharePoint 2013 Document Library. When opening the file from SharePoint into native Excel (not in Webapp view), I have the following code to determine the current location of the file:

    strFilePath = Application.ActiveWorkbook.Path

    When the file is stored on a file server or directly on hard drive there are no issues with this code picking up the current path of where the file resides. However in SharePoint document library, the statement returns a NULL string.

    Is there an equivalent method for determining the path of a file when stored in SharePoint or has anyone else come across this and found a solution?

    Wednesday, December 30, 2015 11:42 PM

All replies