PdcSharepoint.UploadFile: Difference between revisions
Jump to navigation
Jump to search
Created page with "== Declaration == UploadFile(strFilePath as String) as String == Description == Upload a file into Sharepoint, it will be placed in the directory targetted by the name passed..." |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
== Description == | == Description == | ||
Upload a file into Sharepoint, it will be placed in the directory | Upload a file into Sharepoint, it will be placed in the root directory of Sharepoint <br> | ||
If successful, | If successful, the result will contain the itemId for the file in Sharepoint, by which it can be targetted later<br> | ||
If unsuccessful, [[PdcApplication.LastError]] | If unsuccessful, [[PdcApplication.LastError]] will contain an error message | ||
== Code example == | == Code example == | ||
<source lang="vb"> | <source lang="vb"> | ||
Dim sp As PDCEXT.PdcSharepoint = PDC.App.Sharepoint(" | Dim sp As PDCEXT.PdcSharepoint = PDC.App.Sharepoint("DocRepo") | ||
Dim resultId As String = sp.UploadFile("C:\files\test.txt") | Dim resultId As String = sp.UploadFile("C:\files\test.txt") | ||
</source> | </source> |
Latest revision as of 12:30, 14 October 2024
Declaration
UploadFile(strFilePath as String) as String
Description
Upload a file into Sharepoint, it will be placed in the root directory of Sharepoint
If successful, the result will contain the itemId for the file in Sharepoint, by which it can be targetted later
If unsuccessful, PdcApplication.LastError will contain an error message
Code example
Dim sp As PDCEXT.PdcSharepoint = PDC.App.Sharepoint("DocRepo")
Dim resultId As String = sp.UploadFile("C:\files\test.txt")
Availability
Available since 2021R4