Visual Basic 6.0 SharePoint -- Download File - Chilkat Examples
Có thể bạn quan tâm
(Visual Basic 6.0) SharePoint -- Download File
Demonstrates how to download a file from SharePoint located in the /Documents folder.
' This requires the Chilkat API to have been previously unlocked. ' See Global Unlock Sample for sample code. ' ------------------------------------------------------------------------- ' The following comments apply to SharePoint Windows classic authentication. ' ------------------------------------------------------------------------- ' For example, imagine our SharePoint endpoint is https://xyzoffice.mycompany.com/ ' The SHAREPOINT_NTLM_DOMAIN would be "mycompany.com" ' The SHAREPOINT_HTTPS_DOMAIN would be "xyzoffice.mycompany.com" ' Also, the SHAREPOINT_USERNAME would be just the name, not a full email address. ' for example, "chilkat" instead of "[email protected]" Dim http As New ChilkatHttp ' If SharePoint Windows classic authentication is used, then set the ' Login, Password, LoginDomain, and NtlmAuth properties. http.Login = "SHAREPOINT_USERNAME" http.Password = "SHAREPOINT_PASSWORD" http.LoginDomain = "SHAREPOINT_NTLM_DOMAIN" http.NtlmAuth = 1 ' ------------------------------------------------------------------------- ' The more common case is to use SharePoint Online authentication (via the SPOIDCRL cookie). ' If so, do not set Login, Password, LoginDomain, and NtlmAuth, and instead ' establish the cookie as shown at SharePoint Online Authentication ' ------------------------------------------------------------------------- ' This example downloads the file named "Domain Name created for Exchange.docx" ' Note: I was initially confused by the "$value" part of the URL. ' When I see something like $value, I immediately think that it's some sort of ' variable or placeholder to be replaced with an actual value. In this case, ' the "$value" is literally part of the URL. It's not replace with anything. Dim url As String url = "https://SHAREPOINT_HTTPS_DOMAIN/_api/web/GetFolderByServerRelativeUrl('/Documents')/Files('Domain Name created for Exchange.docx')/$value" Dim localFilePath As String localFilePath = "qa_output/x.docx" Dim success As Long success = http.Download(url,localFilePath) If (success <> 1) Then Debug.Print http.LastErrorText Exit Sub End If Debug.Print "File successfully downloaded from SharePoint."
Chilkat ActiveX Downloads
ActiveX for 32-bit and 64-bit Windows
Từ khóa » Visual Basic Download File From Url
-
Download File From URL Code VB.NET - Stack Overflow
-
How To: Download A File - Visual Basic | Microsoft Docs
-
Visual Basic Code Snippet - Download File From URL
-
HowTo: Download A File From The Web And Save It With An ... - VB Helper
-
How To Download File Using Url To Local Pc In VB.NET - CodeProject
-
Thread: Best Way To Download Files - VBForums
-
Visual Basic .NET Tutorial 37 - How To Download A File In VB.NET
-
How To Download Files/Data In Visual Studio - YouTube
-
Thread: Download File From URL - CodeGuru Forums
-
Download A File From The Internet (without A Prompt Dialog)
-
Download File From URL – Visual C++/CLI Development - Skanky
-
Download File From URL In ASP.Net Using C# And VB.Net
-
Download A File From Url Using VBA
-
Command Line Interface (CLI) - Visual Studio Code