could someone please explain why the following button will not create a new location document
Cheers
Sub Click(Source As Button)
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = New NotesDatabase (“” , “names.nsf”)
Set doc = db.CreateDocument ()
doc.form = “Location”
doc.name = “Bacstel”
doc.MailServer = “server”
doc.MailFile = “mail\prom.nsf”
Call doc.Save (False, True)
End Sub
Subject: Maybe this example will explain why?
Dim workspace As New NotesUIWorkspace Call workspace.ComposeDocument( “”, “names.nsf”, “local” )
Dim doc As NotesUIDocument
Set doc = workspace.Currentdocument
Call doc.FieldSetText("ConnectionType", "Local Area Network")
Call doc.FieldSetText("LanPortName", "TCPIP")
Call doc.FieldSetText("Destination", "servername")
Call doc.FieldSetText("OptionalNetworkAddress", "x.x.xx.xx")
Call doc.Save
Call doc.Close
Call workspace.AddDatabase( "servername" , "databasename.nsf" ) ' adds database to workspace
Call workspace.OpenDatabase( "servername" , "databasename.nsf" ) 'opens the database