|
|||||||
Время создания: 31.01.2020 23:15
Текстовые метки: VBA_SharePoint
Раздел: !Закладки - VBA - SharePoint
Запись: xintrea/mytetra_db_adgaver_new/master/base/1580464891wb5xc8uanf/text.html на raw.githubusercontent.com
|
|||||||
|
|||||||
'====================================================================================================== Const CONST_strDisk As String = "X:" Const CONST_strSite As String = "https://_________________/" Const CONST_strFile As String = "X:\07 КАЧЕСТВО/ACTIONS_OF_THE_DAY2.xlsx" Sub Connect_SHarePoint() Dim spMap As Object
Set spMap = CreateObject("WScript.Network") Set FSO = CreateObject("Scripting.FileSystemObject") 'MsgBox "Диск " & Disk & " существует = " & FSO.DriveExists(Disk)
If FSO.DriveExists(CONST_strDisk) Then spMap.RemoveNetworkDrive CONST_strDisk, True
spMap.MapNetworkDrive strDisk, CONST_strDisk 'spPath DoEvents
End Sub '======================================================================================================
Delete Excel file in SharePoint 2010 library only by using VBA У меня есть книга Excel. Когда человек нажимает на марку, файлы сохраняются в двух новых папках, необходимо удалить файл Excel в SharePoint. Я попытался функцию «Kill» в Excel VBA, но говорит, что файл не существует. функция Убить Sub DeleteExample3() 'You can use this to delete one xls file in the folder Test On Error Resume Next Kill "C:\Users\Ron\Test\ron.xls" On Error GoTo 0 End Sub ли какой-либо один имеет успех или пример, убивая файл с помощью VBA ?! Благодаря delete vba2,735 Создан 06 сен. 12 boje First your code sample points to a file locally stored on a hard drive, not a SharePoint file. I'm not an expert in VBA but if you want to delete a SharePoint file from within an Excel file (=client application) I would use/call the SharePoint web services. You can delete a file from a SharePoint list using the lists.asmx web service http://{yourserver}/_vti_bin/lists.asmx Make sure that the user has delete permissions in SharePoint Создан 07 сен. 12 Wout 0 HI W0ut, It is correct that correct that i want's to delete a SharePoint file by clicked a macro in a Excel file. I will look into lists.asmx, and see if this is possible. – boje 08 сен. 12 простой путь к сетевому диску в папке Sharepoint Dim spMap As Object, spPath As String Set spMap = CreateObject("WScript.Network") spMap.MapNetworkDrive "X:", spPath DoEvents Kill "X:\Book1.xls" spMap.RemoveNetworkDrive "X:", True
проверки, чтобы увидеть, если она существует целый другой вопрос ... |
|||||||
![]() |
|||||||
|
|||||||
|