A
allex
Код:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim allnabs As Variant
allnabs=session.addressbooks
Forall books In allnabs
If books.isprivateaddressbook Then
If Not(Books.isopen) Then
Call Books.open("",books.filename)
Set db = books
End If
End If
End Forall
Set view = db.GetView("Connections")
connect = "имя сервера подключения"
Set doc = view.GetDocumentByKey(connect)
If Not doc Is Nothing Then
Print "Документ подключения " & connect &" уже есть"
Else
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = ws.ComposeDocument( "", db.filename, "local" )
Call uidoc.FieldsetText("Destination","notes-имя сервера подключения")
Call uidoc.FieldsetText("OptionalNetworkAddress","dns-имя сервера подключения")
Call uidoc.FieldsetText("PortName","TCPIP")
Call uidoc.FieldsetText("LanPortName","TCPIP")
Call uidoc.Save
Call uidoc.Close
Print "Документ подключения " & connect &" cоздан"
End If
Последнее редактирование: