Private Function RecuperaIdFolder(ByVal FolderName As String) As String
Try
Dim Service As DocumentsService = New DocumentsService("AppTitle")
Service.setUserCredentials(UserName, Password)
Dim Query As FolderQuery = New FolderQuery()
Dim Feed As DocumentsFeed = Service.Query(Query)
If Feed.Entries.Count = 0 Then
Return True
End If
Dim j As Integer = 0
For i As Integer = 0 To Feed.Entries.Count - 1
If Feed.Entries(i).Title.Text = FolderName Then
j = i
Exit For
End If
Next
Dim Entry As DocumentEntry = DirectCast(Feed.Entries(j), DocumentEntry)
Return Entry.ResourceId
Catch ex As Exception
Return Nothing
MsgBox("Errore : " + ex.ToString, MsgBoxStyle.Critical, "Errore RecuperaId Folder")
End Try
End Function