Path not found when using a URL

WaterGypsy

Well-known Member
Joined
Jan 15, 2010
Messages
700
Hi everyone

I am trying to access files on our sharepoint system so that I can update a dashboard showing when they were last run.

I can open a file held on sharepoint if I specify the full path and name, but if I try to access the folder only, so that I can list the files stored in that folder I get "Path not found".

I have tried objFSO.GetFolder and even simply ChDir (which works when I'm recording macro but not when I run that macro afterwards).

I don't even know where to look any more :-((

Thanks in advance for any assistance

Kevin

Forgot to say that the sharepoint address starts http:..... (obviously?)
 
Last edited:

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi Kevin,

Just a guess:

Maybe setting the "Hyperlink Base" will work?

Code:
ThisWorkbook.BuiltinDocumentProperties("Hyperlink Base") = "... Your Path Here ..."
You can also access the "Hyperlink Base" from the GUI in properties dialog box.

Gary
 
Upvote 0
Are you saying you can open a file held on sharepoint via its URL (http://) using the File System Object?

If so, that surprises me. (I freely admit to knowing nothing about SharePoint but I have set up Web servers and Web sites in the past.)

I would have though that in order to use FSO to get to the folder, you need to reference it by its full path name, i.e. to pass the request to the filing system rather than the Web server.

Can you post your code?
 
Last edited:
Upvote 0
Sorry Ruddles, I may have inadvertently misled you ....

I can open the file normally using

Public Const sTimeSheetFilePath As String = "http://sharepoint.xyz.com/Management/Internal Dashboard/TimeSheets yyyymmdd.xlsx"

Workbooks.Open Filename:=sTimeSheetFilePath

My problem is that there may be several files in the folder with different dates, I want to be able to loop through and select the most recent file for processing.

I can do it using "Dir" where the path is a local or shared drive but not where the folder is addressed using "http:"
 
Upvote 0
And you don't know the actual path to the folder? I mean, you can't get to it via the Windows filing system UNC - \\server\path?
 
Upvote 0
... which didn't pan out ..... but in looking at the problem with a colleague I realised that the sharepoint pages may not be folders in the strict sense of the word - they appear to be web pages that act like folders so need to be treated differently.

Thanks for the input folks
 
Upvote 0
Did you ever figure out how to get a listing of files on a SharePoint path? I too am needing to do that. Thanks.
 
Upvote 0
Sorry Mike I couldn't :( but I did think that maybe because it isn't a pure directory that was the reason I couldn't use the normal methods
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top