Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general,microsoft.public.sharepoint.portalserver
external usenet poster
 
Posts: 49
Default FileSystemObject does not work on SharePoint

I have written the following function that checks is a directory
exists.
I'm posting to Excel and Word-related groups, because I use these
functions in Excel and Word, both 2003 versions. I'm also posting to a
SharePoint group because my function has an issue with SharePoint
(MOSS 2007).


Function DirectoryExists(ByVal PathName As String) As Boolean
'Macro Purpose: Function returns TRUE if the specified
' folder exists, false if not.

'declarations
Dim objFSO As Object
Set objFSO = CreateObject("Scripting.FileSystemObject")

'determine if it exists
DirectoryExists = objFSO.FolderExists(PathName)

'close everything up
Set objFSO = Nothing
End Function


My question: why does this function return false on an existing
SharePoint directory? For example:
Debug.Print DirectoryExists("http://teamsites/sites/lolcats/foo/bar/")

I have not yet tested, but I have a similar function that creates a
directory (after I have checked that it doesn't exist), and I expect
it will fail too. Is there something special about SharePoint that
causes the FileSystemObject not to behave as expected?

--
Amedee
  #2   Report Post  
Posted to microsoft.public.sharepoint.portalserver,microsoft.public.excel.programming,microsoft.public.word.vba.general
external usenet poster
 
Posts: 3,355
Default FileSystemObject does not work on SharePoint

I bet it would work if you mapped the "directory" to a drive. Have you tried
that?
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Amedee Van Gasse" wrote:

I have written the following function that checks is a directory
exists.
I'm posting to Excel and Word-related groups, because I use these
functions in Excel and Word, both 2003 versions. I'm also posting to a
SharePoint group because my function has an issue with SharePoint
(MOSS 2007).


Function DirectoryExists(ByVal PathName As String) As Boolean
'Macro Purpose: Function returns TRUE if the specified
' folder exists, false if not.

'declarations
Dim objFSO As Object
Set objFSO = CreateObject("Scripting.FileSystemObject")

'determine if it exists
DirectoryExists = objFSO.FolderExists(PathName)

'close everything up
Set objFSO = Nothing
End Function


My question: why does this function return false on an existing
SharePoint directory? For example:
Debug.Print DirectoryExists("http://teamsites/sites/lolcats/foo/bar/")

I have not yet tested, but I have a similar function that creates a
directory (after I have checked that it doesn't exist), and I expect
it will fail too. Is there something special about SharePoint that
causes the FileSystemObject not to behave as expected?

--
Amedee

  #3   Report Post  
Posted to microsoft.public.sharepoint.portalserver,microsoft.public.excel.programming,microsoft.public.word.vba.general
external usenet poster
 
Posts: 49
Default FileSystemObject does not work on SharePoint

On Sep 26, 4:01*pm, Barb Reinhardt
wrote:
I bet it would work if you mapped the "directory" to a drive. *Have you tried
that?


I cannot map a Sharepoint folder to a drive. I tried: RMB on My
Computer, map network drive, enter the url http://teamsites/sites/lolcats/foo/bar
but then I cannot click on the OK button.
When I enter it in UNC notation, replace http:// with \\, I cannot
browse to the folder.





By the way, "If this post was helpful to you, please click YES below."
-- I don't understand. I am using the Google HTTP interface for the
Usenet NNTP groups. Am I missing something here?
Your answer *is* helpful. It doesn't solve my problem but it may push
me in the right direction.

--
Amedee
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel links & SharePoint 3.0 (worked fine with SharePoint 2.0) ScottFisher2004 Excel Discussion (Misc queries) 0 November 10th 08 03:26 PM
FileSystemObject help please. Tom Ogilvy Excel Programming 0 July 8th 05 04:44 PM
FileSystemObject help please. Bob Phillips[_7_] Excel Programming 0 July 8th 05 04:44 PM
filesystemobject Alvin Hansen[_2_] Excel Programming 3 January 27th 05 06:17 PM
Help with FileSystemObject? Ed[_9_] Excel Programming 2 August 5th 03 12:08 AM


All times are GMT +1. The time now is 04:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"