The only way I've found to work with files on SharePoint while having to server rights is to map the drive. Here's an example class for implementing a mapped SharePoint drive and disposing of it. Create a new 'Class' module and add the following code:
Option Explicit
Private m_SPPath As String
Private m_MapPath As String
Private m_NewDriveLetter As String
Property Let SPPath(v As String)
m_SPPath = v
End Property
Property Get SPPath() As String
SPPath = m_SPPath
End Property
Property Get MapPath() As String
If m_MapPath <> "" Then
MapPath = m_MapPath
Else
MsgBox prompt:="Path has not been mapped." & vbCrLf & vbCrLf & _
"Try executing the 'Map' meathod if you have not already done so.", _
Title:="CS Automation", _
Buttons:=vbInformation
End If
End Property
Public Function Map() As Boolean
Const Alphabete As String = "A B C D E F G H I J K L M N O P Q R S T U V W X W Z"
Dim i As Long ' counter for looping alphabete
Dim oFSO As Scripting.FileSystemObject
Dim oDrive As Scripting.Drive
Dim alpha
Dim WshNetwork
Set oFSO = New FileSystemObject
alpha = Split(Alphabete)
For Each oDrive In oFSO.Drives
For i = LBound(alpha) To UBound(alpha)
If oDrive.DriveLetter = alpha(i) Then alpha(i) = "0"
Next i
Next oDrive
For i = LBound(alpha) To UBound(alpha)
If alpha(i) <> "0" Then
m_NewDriveLetter = alpha(i)
Exit For
End If
Next i
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive m_NewDriveLetter & ":", m_SPPath
Set WshNetwork = Nothing
m_MapPath = m_NewDriveLetter & ":\"
End Function
Public Function Dispose() As Boolean
Dim WshNetwork
Set WshNetwork = CreateObject("WScript.Network")
On Error Resume Next
WshNetwork.RemoveNetworkDrive m_NewDriveLetter & ":"
Set WshNetwork = Nothing
End Function
Then you can implement it in your code:
Private Sub testclstempmapsp()
'test passed 10-29-09
'by Chris Hayes
Dim c As cls_TempMapSP
Set c = New cls_TempMapSP
'you can view the list in explorer view
'and copy the path
c.SPPath = "http://your/sharepoint/path"
c.Map
'Do your code on your files here
'you can use Scripting.FileScriptingObject
'reference and program against it
Debug.Print c.MapPath
'when you're done, you can dispose the mapping
'so the user doesn't see it
c.Dispose
Set c = Nothing
End Sub