API Code Samples - Get Library via Notes: Function GetLibraryViaNotes (theAPI As Variant, libsvrnm As String, libpath As String, userpwd As String) As Variant ' retrieves library api object (and returns if successful) Dim uripath As String Dim masterflg As String ' test for master after library get On Error Goto FErrorHandler ' assemble URI and open library libpath = ReplaceSlashes(libpath) uripath = "notes://" & libsvrnm + "!!" & libpath Call theApi.SetNotesLogin(userpwd) Set GetLibraryViaNotes = theApi.GetLibrary(uripath) ' verify we really have opened it (cannot know until you access a property) On Error Resume Next Err=0 masterflg = GetLibraryViaNotes.MasterServer If Err>0 Then ' we didn't really open it... Set getLibraryViaNotes = Nothing Err = 0 ' Reset error code End If Exit Function FErrorHandler: Set GetLibraryViaNotes = Nothing Exit Function End Function Function ReplaceSlashes (sPath As String) As String '*************************************************************************************************** '* The following subroutine replaces all slashes (\) in the filename with a '/'. '*************************************************************************************************** Do While Instr(sPath,"\") > 0 sPath = Left$(sPath, Instr(sPath,"\")-1) + "/" + Right$(sPath,Len(sPath)-Instr(sPath,"\")) Loop ReplaceSlashes=sPath End Function