Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Excel 2010 WebDav Connection to SharePoint Errors


20 Apr 2012   #1

Win 7 Enterprise 64 Bit
 
 
Excel 2010 WebDav Connection to SharePoint Errors

I am in the process of assisting some users in switching from Win XP/Office 2003 -> Win 7/Office 2010 and have hit a roadblock. I have a user that has an excel macro that opens an ADO connection to a SharePoint and grabs a record of the excel files on the SharePoint. The macro works perfectly on XP/2003 and XP/2010 but fails on 7/2010.
They are using this connection line:
Code:
davDir.Open "", "URL=http://SharePoint/Directory/URL", _ 
   adModeRead, adFailIfNotExists, adDelayFetchStream
 
Set davFiles = davDir.GetChildren()
Once they have the record they iterate through each Excel file on the SharePoint to open and parse them.

On Windows 7/2010 I get these errors when it gets to the davDir.Open line:

When they error trap it throws this error:

Quote:
Object or data matching the name, range, or selection criteria was not found within the scope of this operation.
Without error trapping it throws this error:

Quote:
Run-time error '-2147217895 (80040e19):Automation error
I can connect to the SharePoint fine via IE or File/Open in Excel 2010. I have tried every variation of the URL I can and I just keep getting the same error.

Does anyone have any ideas? The fact it works on XP/2010 screams Win 7 issue to me, but beyond that I am lost. I have spent the last 2 days scouring Google and I am starting to lose my mind.

Thanks!

My System SpecsSystem Spec
.

31 May 2012   #2

Windows 7 Enterprise
 
 

I've had just this problem and have narrowed it down to making the connection. The following code produces the same error on SP 2007 from Win 7:

Dim Conn As New ADODB.Connection
sURL = "http://sharepointtest2/personal/kraviss/Test docs/ACT Contracts Data" RepositoryRepository"
Conn.Open "URL=" & sURL


I've found WebDav to be most unreliable when uploading files to SP doc libraries and a little less unreliable when reading properties. I use the Frontpage Server extensions to do most uploading. FilesystemObject calls work most of the time to get file and folder properties - the following code fragment will get folder contents. sFolder is the UNC path for the SP doc library

Dim objFSO as New Scripting.filesystemobject
Dim objFolder as Scripting.Folder
Dim colFiles as Scripting.Files
Dim colFolders as Scripting.Folders

sFolder = "\\sharepointtest2\personal\kraviss\Test docs\ACT Contracts Data"
set objFolder = objFSO.GetFolder(sFolder)
set colFiles = objFolder.Files
set colFolders = objFolder.Subfolders

This will need a reference to Microsoft Scripting Runtime scrrun.dll in C:\Windows\SysWOW64
My System SpecsSystem Spec
Reply

 Excel 2010 WebDav Connection to SharePoint Errors




Thread Tools




Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 06:48 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33